This function loads and processes a modal dialog window and returns the result value established by the WinDismissDlg call.
#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. */ ULONG ulResult; /* Reply value. */ ulResult = WinDlgBox(hwndParent, hwndOwner, pfnDlgProc, hmod, idDlg, pCreateParams);