PDA

View Full Version : RegisterHotKey( works, but how to register a multimedia key?



arthurprs
16-04-2008, 03:10 AM
i already tried something like,

RegisterHotKey(appwinHANDLE, 3004, 0, $B3);

$B3 is the code for multimedia key "PLAY"

how can i register a hotkey for the keys (Stop, Play, Vol up, Vol down...) ?


os: windows
compile : delphi

JernejL
16-04-2008, 04:36 PM
You can't.. since explorer registers them before you do.

arthurprs
16-04-2008, 05:07 PM
but how wmp does it :? ?

JernejL
16-04-2008, 06:34 PM
but how wmp does it :? ?

are you sure it registers hotkeys rather than use system messages?

arthurprs
16-04-2008, 07:07 PM
but how wmp does it :? ?

are you sure it registers hotkeys rather than use system messages?

no =P

i can detect them using messages? how?

JernejL
16-04-2008, 09:03 PM
but how wmp does it :? ?

are you sure it registers hotkeys rather than use system messages?

no =P

i can detect them using messages? how?

wm_keydown in your own app, if you want it global, you could use stuff like GetKeyboardState..

arthurprs
16-04-2008, 10:22 PM
but how wmp does it :? ?

are you sure it registers hotkeys rather than use system messages?

no =P

i can detect them using messages? how?

wm_keydown in your own app, if you want it global, you could use stuff like GetKeyboardState..

most of time the app is hided, so i probably can't use _keydown

i need a timer or something like that to use GetKeyboardState?

JSoftware
16-04-2008, 10:36 PM
I think a better way would be to use SetWindowsHookEx

arthurprs
17-04-2008, 01:41 AM
I think a better way would be to use SetWindowsHookEx

can you give more info ?