-
May 14th, 2004, 08:03 PM
#1
Trapping and Sending Keypresses
Hello, I've recently found interest in trapping and sending keypresses. I have been unable to locate the information that is specific to my problem. I did numerous forum searches, read through articles, and searched other websites. I'm trying to detect a keypress in MFC while not focusing the application that is detecting it. I'm trying to give the application a "hotkey" which I need to be able to activate without focus. If anyone can point me in the right direction with a tutorial or anything, it would be much appreciated.
Thanks
-
May 14th, 2004, 08:12 PM
#2
Look for System wide Keyboard hook ., which may help you to solve your problem.!
-
May 14th, 2004, 08:15 PM
#3
It is the way some programs such as Unikey, or IME do. If you want to capture all keypress of the system, you have to use hooking API. Besides you can also detect mouse events. When you use function to hook event, every mentioned events are sent to your own function. Then you forward events to the system if you want. Many others program may use these events. So it is better off forwarding all events you received. Please read MSDN for details. It is just I heard about that. I have never done it before.
Quang
-
May 15th, 2004, 04:58 AM
#4
Take a look at the following article...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|