windows应用开发由浅入深(四)创建热键消息

相关API:BOOL RegisterHotKey(   HWND hWnd,   int id,   UINT fsModifiers,   UINT vk );

MSDN描述:This function defines a system-wide hot key.  定义一个系统级的热键。


相关消息:WM_HOTKEY

MSDN描述:This message is posted when the user presses a hot key registered by the RegisterHotKey function. The message is placed at the top of the message queue associated with the thread that registered the hot key.

                        当用户按下热键--用RegisterHotKey()注册过的--时,会产生WM_HOTKEY消息。这个消息会放在注册这个热键的线程的消息队列的顶端。


相关消息宏:ON_WM_HOTKEY()

相关消息函数:void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);


注册热键后,当用户按下这一热键,系统产生WM_HOTKEY消息给注册热键的窗口,窗口执行ONHotKey()响应。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值