How do I go about catching keyboard messages (WM_KEYDOWN, etc.) for the entire screen, not just my app's window? Thanks in advance,
Don McGee
[email protected]
Printable View
How do I go about catching keyboard messages (WM_KEYDOWN, etc.) for the entire screen, not just my app's window? Thanks in advance,
Don McGee
[email protected]
Hi,
To catch a message globally, you have to install a hook procedure. In order for the hook to be system wide, the hook callback function itself has to be contained in a DLL. To catch all messages, use SetWindowsHookEx with the hook type as WM_CALLWNDPROC. If you only want to catch a specific type of message, there are other constants to suit your needs. You should check the documentation for full details.
Daniel.