This function creates a message-box window that can be used to display error messages and ask questions.
#define INCL_WINDIALOGS /* Or use INCL_WIN, INCL_GPI, INCL_WINWINDOWMGR, */ #include <os2.h> HWND hwndParent; /* Parent-window handle of the message-box window to be created. */ HWND hwndOwner; /* Requested owner-window handle of the message-box window to be created. */ PSZ pszText; /* Message-box window message. */ PSZ pszTitle; /* Message-box window title. */ ULONG ulWindow; /* Message-box window identity. */ PMB2INFO pmb2info; /* Input structure for mesage-box window. */ ULONG ulButtonId; /* Id of the button that was clicked, or MBID_ERROR. */ ulButtonId = WinMessageBox2(hwndParent, hwndOwner, pszText, pszTitle, ulWindow, pmb2info);