This example shows a typical dialog box procedure. A switch statement is used to process individual messages. All messages not processed are passed on to the WinDefDlgProc function.

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

MRESULT AboutDlg(HWND hwnd, ULONG  ulMessage, MPARAM mpParam1,
                          MPARAM mpParam2)
{
    switch (ulMessage) {

        /*
         * Process whatever messages you want here and send the rest
         * to WinDefDlgProc.
         */

        default:
            return (WinDefDlgProc(hwnd, ulMessage, mpParam1, mpParam2));
    }
}


[Back] [Next]