This example processes an application-defined message (IDM_OPEN) and calls WinDlgBox to load a dialog box.

#define IDD_OPEN 1
#define INCL_WINDIALOGS         /* Window Dialog Mgr Functions  */
#include <os2.h>

HWND   hwndFrame;       /* frame window handle                  */
PFNWP  OpenDlg;

case IDM_OPEN:
    if (WinDlgBox(HWND_DESKTOP,
            hwndFrame,    /* handle of the owner         */
            OpenDlg,      /* dialog procedure address    */
            NULLHANDLE,   /* location of dialog resource */
            IDD_OPEN,     /* resource identifier         */
            NULL)) {      /* application-specific data   */
       .
       . /* code executed if dialog box returns TRUE */
       .
    }


[Back] [Next]