相关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()响应。