afx_msg UINT OnGetDlgCode();
Normally, Windows handles all DIRECTION-key and TAB-key input to a CWnd control. When OnGetDlgCode is called, a CWnd control can choose a particular type of input to process itself.
Although the Default and DefWindowProc member functions always return 0 in response to the WM_GETDLGCODE message, the OnGetDlgCode functions for the predefined control classes return a code appropriate for each class.
OnGetDlgCode's returned values are useful only with user-defined dialog controls or standard controls modified by subclassing.
This message-handler member function calls the Default member function. Override this member function in your derived class to handle the WM_GETDLGCODE message.
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 | Pushbutton. |
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. |
CWnd::Default, WM_GETDLGCODE