DefDlgProc

3.0

  LRESULT DefDlgProc(hwndDlg, uMsg, wParam, lParam)    
  HWND hwndDlg; /* handle of dialog box */
  UINT uMsg; /* message */
  WPARAM wParam; /* first message parameter */
  LPARAM lParam; /* second message parameter */

The DefDlgProc function provides default processing for any Windows messages that a dialog box with a private window class does not process.

Parameters

hwndDlg

Identifies the dialog box.

uMsg

Specifies the message to be processed.

wParam

Specifies 16 bits of additional message-dependent information.

lParam

Specifies 32 bits of additional message-dependent information.

Return Value

The return value specifies the result of the message processing and depends on the message sent.

Comments

The DefDlgProc function is the window procedure for the DIALOG window class. An application that creates new window classes that inherit dialog box functionality should use this function. DefDlgProc is not intended to be called as the default handler for messages within a dialog box procedure, since doing so will result in recursive execution.

An application creates a dialog box by calling one of the following functions:

Function Description

CreateDialog Creates a modeless dialog box.
CreateDialogIndirect Creates a modeless dialog box.
CreateDialogIndirectParam Creates a modeless dialog box and passes data to it when it is created.
CreateDialogParam Creates a modeless dialog box and passes data to it when it is created.
DialogBox Creates a modal dialog box.
DialogBoxIndirect Creates a modal dialog box.
DialogBoxIndirectParam Creates a modal dialog box and passes data to it when it is created.
DialogBoxParam Creates a modal dialog box and passes data to it when it is created.

See Also

DefWindowProc