Applies to: desktop apps only
Sent to the window procedure associated with a control. By default, the system handles all keyboard input to the control; the system interprets certain types of keyboard input as dialog box navigation keys. To override this default behavior, the control can respond to the WM_GETDLGCODE message to indicate the types of input it wants to process itself.
#define WM_GETDLGCODE 0x0087
Parameters
- wParam
-
The virtual key, pressed by the user, that prompted Windows to issue this notification. The handler must selectively handle these keys. For instance, the handler might accept and process VK_RETURN but delegate VK_TAB to the owner window. For a list of values, see Virtual-Key Codes.
- lParam
-
A pointer to an MSG structure (or NULL if the system is performing a query).
Return value
The return value is one or more of the following values, indicating which type of input the application processes.
| Return code/value | Description |
|---|---|
|
Button. |
|
Default push button. |
|
EM_SETSEL messages. |
|
Radio button. |
|
Static control. |
|
Non-default push button. |
|
All keyboard input. |
|
Direction keys. |
|
WM_CHAR messages. |
|
All keyboard input (the application passes this message in the MSG structure to the control). |
|
TAB key. |
Remarks
Although the DefWindowProc function always returns zero in response to the WM_GETDLGCODE message, the window procedure 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 box controls or standard controls modified by subclassing.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
See also
- Reference
- DefWindowProc
- EM_SETSEL
- MSG
- WM_CHAR
- Conceptual
- Dialog Boxes
Send comments about this topic to Microsoft
Build date: 2/10/2012
WM_GETDLGCODE = &H87
Public Enum WM_GETDLGCODE As Integer
DLGC_BUTTON = &H2000
DLGC_DEFPUSHBUTTON = &H10
DLGC_HASSETSEL = &H8
DLGC_RADIOBUTTON = &H40
DLGC_STATIC = &H100
DLGC_UNDEFPUSHBUTTON = &H20
DLGC_WANTALLKEYS = &H4
DLGC_WANTARROWS = &H1
DLGC_WANTCHARS = &H80
DLGC_WANTMESSAGE = &H4
DLGC_WANTTAB = &H2
End Enum