Capturing windows events (hooks)..

  • Thread starter Thread starter Mohit Sachdeva
  • Start date Start date
M

Mohit Sachdeva

Hello folks.
I want my app to process windows events first, so that it has some kind of a
"global hook". The scenario is - i want my app to process all messages for
"F3" key (or any other key for that matter) first before any other window
does it. This has to happen whether my app is minimized, inactive,not in
focus, in systray etc..
I tried playing around with WndProc and overriding it but it doesnt capture
all key events (WM_KEYDOWN) events. Im sure im missing the point somewhere.
Anyone care to point me in the right direction?

Much appreciated.
Mohit
 
What you're looking for is the Win32 Api, RegisterHotKey. Do a native call
and register your Form's window handle.

VJ
 
Back
Top