The RegisterHotKey function defines a system-wide hot key.
BOOL RegisterHotKey(
HWND hWnd, |
// window to receive hot-key notification |
int id, |
// identifier of hot key |
UINT fsModifiers, |
// key-modifier flags |
UINT vk |
// virtual-key code |
); |
Value |
Meaning |
MOD_ALT |
Either ALT key must be held down. |
MOD_CONTROL |
Either CTRL key must be held down. |
MOD_SHIFT |
Either SHIFT key must be held down. |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
When a key is pressed, the system looks for a match against all hot keys. Upon finding a match, the system posts the WM_HOTKEY message to the message queue of the thread that registered the hot key. This message is posted to the beginning of the queue so it is removed by the next iteration of the message loop.
This function cannot associate a hot key with a window created by another thread.
RegisterHotKey fails if the keystrokes specified for the hot key have already been registered by another hot key.
If the window identified by the hWnd parameter already registered a hot key with the same identifier as that specified by the id parameter, the new values for the fsModifiers and vk parameters replace the previously specified values for these parameters.
GlobalAddAtom, UnregisterHotKey, WM_HOTKEY
file: /Techref/os/win/api/win32/func/src/f72_17.htm, 4KB, , updated: 2000/4/7 12:19, local time: 2024/8/23 16:01,
18.188.86.125:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://piclist.com/tecHREF/os/win/api/win32/func/src/f72_17.htm"> RegisterHotKey</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to piclist.com! |
.