DM_GETDEFID message (Windows)

Switch View :
ScriptFree
DM_GETDEFID message

Applies to: desktop apps only

Retrieves the identifier of the default push button control for a dialog box.

#define WM_USER              0x0400
#define DM_GETDEFID         (WM_USER+0)

Parameters

wParam

This parameter is not used and must be zero.

lParam

This parameter is not used and must be zero.

Return value

If a default push button exists, the high-order word of the return value contains the value DC_HASDEFID and the low-order word contains the control identifier. Otherwise, the return value is zero.

Remarks

The DefDlgProc function processes this message.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

See also

Reference
DefDlgProc
DM_SETDEFID
Conceptual
Dialog Boxes

 

 

Send comments about this topic to Microsoft

Build date: 2/10/2012

Community Content

simdoc
Return zero is not sufficient
This documentation is misleading. You don't return zero, you return zero in the low order word. The high order word still needs to be DC_HASDEFID.