win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinDefDlgProc (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINDIALOGS
 
MRESULT WinDefDlgProc(hwndDlg, msg, mp1, mp2)
HWND hwndDlg;    /* handle of the dialog */
USHORT msg;      /* message              */
MPARAM mp1;      /* message parameter    */
MPARAM mp2;      /* message parameter    */
 
The WinDefDlgProc function calls the default dialog procedure. The default
dialog procedure provides default processing for any dialog window messages
that an application does not process. This function is used to ensure that
every message is processed. It should be called with the same parameters as
those received by the dialog procedure.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwndDlg    Identifies the dialog window that received the message.
 
msg        Specifies the message.
 
mp1        Specifies message parameter 1.
 
mp2        Specifies message parameter 2.
 
Return Value
 
The return value is dependent on the message that was passed to this
function.
 
Example
 
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.
 
MRESULT EXPENTRY AboutDlg(hwnd, usMessage, mp1, mp2)
HWND   hwnd;
USHORT usMessage;
MPARAM mp1;
MPARAM mp2;
{
    switch (usMessage) {
 
        /*
         * Process whatever messages you want here and send the rest
         * to WinDefWindowProc.
         */
 
        default:
            return (WinDefDlgProc(hwnd, usMessage, mp1, mp2));
    }
}
 
See Also
 
WinDefWindowProc