This function loads and processes a modal secondary window and returns the result value established by WinDismissSecondaryWindow.
#define INCL_SW #include <os2.h> HWND hwndParent; /* Parent window handle. */ HWND hwndOwner; /* Owner window handle. */ PFNWP pfnDlgProc; /* Secondary window procedure. */ HMODULE hmod; /* Module handle. */ ULONG idDlg; /* Resource ID of dialog template. */ PVOID pCreateParams; /* Parameters passed to secondary window proc. */ ULONG rc; /* Results. */ rc = WinSecondaryWindow(hwndParent, hwndOwner, pfnDlgProc, hmod, idDlg, pCreateParams);