您的位置:首页 > 其它

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

2014-03-06 15:26 357 查看
相关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()响应。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: