WM_GETDLGCODE

This message is sent by Windows to an input procedure associated with a control. Normally, Windows handles all DIRECTION-key and TAB-key input to the control. By responding to the WM_GETDLGCODE message, an application can take control of a particular type of input and process the input itself.

Parameter Description  

wParam Is not used.  
lParam Is not used.  

Return Value

The return value is one or more of the following values, indicating which type of input the application processes:

Value Meaning

DLGC_DEFPUSHBUTTON Default push button.
DLGC_HASSETSEL EM_SETSEL messages.
DLGC_PUSHBUTTON Push button.
DLGC_RADIOBUTTON Radio button.
DLGC_WANTALLKEYS All keyboard input.
DLGC_WANTARROWS DIRECTION keys.
DLGC_WANTCHARS WM_CHAR messages.
DLGC_WANTMESSAGE All keyboard input (the application passes this message on to control).
DLGC_WANTTAB TAB key.

Default Action

The DefWindowProc function returns zero.

Comments

Although the DefWindowProc function always returns zero in response to the WM_GETDLGCODE message, the window functions for the predefined control classes return a code appropriate for each class.

The WM_GETDLGCODE message and the returned values are useful only with user-defined dialog controls or standard controls modified by subclassing.