Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

A hot keyis a key combination that generates a WM_HOTKEYmessage. The message is routed to a particular window, regardless of whether or not that window is the current foreground window or focus window.

You define a hot key by calling the RegisterHotKeyfunction and specifying the combination of keys that generates the WM_HOTKEY message, the handle of the window to receive the message, and the identifier of the hot key. When the user presses the hot key, the system places a WM_HOTKEY message in the message queue of the thread that created the specified window. The wParamparameter of the message contains the identifier of the hot key. Before the application terminates, it should use the UnregisterHotKeyfunction to destroy the hot key.

See Also