This function creates a dialog window from the dialog template idDlg in hmod and returns the dialog window handle.

#define INCL_WINDIALOGS /* Or use INCL_WIN, INCL_PM, Also in COMMON section */
#include <os2.h>

HWND       hwndParent;     /*  Parent-window handle of the created dialog window. */
HWND       hwndOwner;      /*  Requested owner-window handle of the created dialog window. */
PFNWP      pfnDlgProc;     /*  Dialog procedure for the created dialog window. */
HMODULE    hmod;           /*  Resource identity containing the dialog template. */
ULONG      idDlg;          /*  Dialog-template identity within the resource file. */
PVOID      pCreateParams;  /*  Pointer to application-defined data area. */
HWND       hwndDlg;        /*  Dialog-window handle. */

hwndDlg = WinLoadDlg(hwndParent, hwndOwner,
            pfnDlgProc, hmod, idDlg, pCreateParams);


[Back] [Next]