WinCreateWindow creates a new window of class pszClass and returns hwnd.

#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HWND     hwndParent;        /*  Parent-window handle. */
PSZ      pszClass;          /*  Registered-class name. */
PSZ      pszName;           /*  Window text. */
ULONG    flStyle;           /*  Window style. */
LONG     x;                 /*  x-coordinate of window position. */
LONG     y;                 /*  y-coordinate of window position. */
LONG     cx;                /*  Width of window, in window coordinates. */
LONG     cy;                /*  Height of window, in window coordinates. */
HWND     hwndOwner;         /*  Owner-window handle. */
HWND     hwndInsertBehind;  /*  Sibling-window handle. */
ULONG    id;                /*  Window identifier. */
PVOID    pCtlData;          /*  Pointer to control data. */
PVOID    pPresParams;       /*  Presentation parameters. */
HWND     hwnd;              /*  Window handle. */

hwnd = WinCreateWindow(hwndParent, pszClass,
         pszName, flStyle, x, y, cx, cy, hwndOwner,
         hwndInsertBehind, id, pCtlData, pPresParams);


[Back] [Next]