Board index » cppbuilder » global hotkey?

global hotkey?


2008-07-06 04:36:36 AM
cppbuilder93
is there an API call for a global hotkey? if so, how do I go about setting
this up?
 
 

Re:global hotkey?

Hi:
To SEt a global Hotkey use the RegisterHotKey function declared in
windows.h.
This unction take the hwnd to the indows to recieve the wm_hotkey message,
the unique id o the hotkey you registering (see note later regarding dlls),
any modifiers you with to use and the virtual key code of the key you wish
to register.
If your using a shared dll, you need to use GlobalAddAtom and save the
returned value somewhere as aposed to choosingyour own id. This is to do
with the ranges of values hotkeys from dlls can take.
To unregister a hotkey youuse UnRegisterHotKey again declared in windows.h.
You also need to handle the wm-hotkey message in the window the hotkey
pertanes to.
The following will give you more info:
REgisterHotKey:
www.msdn.microsoft.com/en-us/library/ms646309.aspx"
hth
Sean.
Carl Danley" < XXXX@XXXXX.COM >wrote in message
Quote
is there an API call for a global hotkey? if so, how do I go about setting
this up?