Export (0) Print
Expand All

DefDlgProc function

Calls the default dialog box window procedure to provide default processing for any window messages that a dialog box with a private window class does not process.

Syntax


LRESULT WINAPI DefDlgProc(
  _In_  HWND hDlg,
  _In_  UINT Msg,
  _In_  WPARAM wParam,
  _In_  LPARAM lParam
);

Parameters

hDlg [in]

Type: HWND

A handle to the dialog box.

Msg [in]

Type: UINT

The message.

wParam [in]

Type: WPARAM

Additional message-specific information.

lParam [in]

Type: LPARAM

Additional message-specific information.

Return value

Type: LRESULT

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

Remarks

The DefDlgProc function is the window procedure for the predefined class of dialog box. This procedure provides internal processing for the dialog box by forwarding messages to the dialog box procedure and carrying out default processing for any messages that the dialog box procedure returns as FALSE. Applications that create custom window procedures for their custom dialog boxes often use DefDlgProc instead of the DefWindowProc function to carry out default message processing.

Applications create custom dialog box classes by filling a WNDCLASS structure with appropriate information and registering the class with the RegisterClass function. Some applications fill the structure by using the GetClassInfo function, specifying the name of the predefined dialog box. In such cases, the applications modify at least the lpszClassName member before registering. In all cases, the cbWndExtra member of WNDCLASS for a custom dialog box class must be set to at least DLGWINDOWEXTRA.

The DefDlgProc function must not be called by a dialog box procedure; doing so results in recursive execution.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

DefDlgProcW (Unicode)

See also

Reference
DefWindowProc
GetClassInfo
RegisterClass
WNDCLASS
Conceptual
Dialog Boxes

 

 

Community Additions

ADD
Show:
© 2014 Microsoft