This function dispatches messages while a modal dialog window is displayed.
#define INCL_WINDIALOGS /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndDlg; /* Dialog-window handle. */ ULONG ulReply; /* Reply value. */ ulReply = WinProcessDlg(hwndDlg);