DM_GETDEFID
wParam = 0; /* not used, must be zero */
lParam = 0L; /* not used, must be zero */
An application sends a DM_GETDEFID message to get the identifier of the default push button for a dialog box.
This message has no parameters.
The return value is a doubleword value. If the default push button has an identifier value, the high-order word contains DC_HASDEFID and the low-order word contains the identifier value. The return value is zero if the default push button does not have an identifier value.
This example gets the identifier of the default push button of a dialog box:
DWORD dwResult;
WORD idDefPushButton;
dwResult = SendMessage(hdlg, DM_GETDEFID, 0, 0L);
if (HIWORD(dwResult) == DC_HASDEFID)
idDefPushButton = LOWORD(dwResult);