相關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()響應。