WM_GETDLGCODE message

WM_GETDLGCODE message

 

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.

 

发送此消息给某个与对话框程序关联的控件,widdows控制方位键和TAB键使输入进入此控件

通过响应WM_GETDLGCODE消息,应用程序可以把他当成一个特殊的输入控件并能处理它

Called for a control so the control can process arrow-key and TAB-key input itself. Normally, Windows handles all arrow-key and TAB-key input to a CWnd control. By overriding OnGetDlgCode, a CWnd control can choose a particular type of input to process itself. The default OnGetDlgCode functions for the predefined control classes return a code appropriate for each class.
Return Value
One or more of the following values, indicating which type of input the application processes:
·                     DLGC_BUTTON   Button (generic).
·                     DLGC_DEFPUSHBUTTON   Default pushbutton.
·                     DLGC_HASSETSEL   EM_SETSEL messages.
·                     DLGC_UNDEFPUSHBUTTON   No default pushbutton processing. (An application can use this flag with DLGC_BUTTON to indicate that it processes button input but relies on the system for default pushbutton processing.)
·                     DLGC_RADIOBUTTON   Radio button.
·                     DLGC_STATIC   Static control.
·                     DLGC_WANTALLKEYS   All keyboard input.
·                     DLGC_WANTARROWS   Arrow keys.
·                     DLGC_WANTCHARS   WM_CHAR messages.
·                     DLGC_WANTMESSAGE   All keyboard input. The application passes this message on to the control.
·                     DLGC_WANTTAB   TAB key.
 

https://blog.csdn.net/magicsutra/article/details/1925072

参考:

https://docs.microsoft.com/en-us/windows/win32/dlgbox/wm-getdlgcode

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值