Re: I have a real problem with hooks
Quote:
Originally Posted by snakekain
Thank you for your reply, sorry for taking a lot of your time, i need a system-wide hotkey but i don't want it to prevent every other application from recieving the key because that will annoy the user, i want my app in the system tray recieving the hot key messages, while the user works with other apps uninterrupted.
In the example i gave the user will be bothered a lot finding that pressing Q will not write Q in the note pad or any other app while my app is working.
If that'll not work i guess working with system-wide hooks will do because it doesn't prevent other apps from recieving the messages except if i returned 1, and that means i'll have to find a work around to work with the hotkey format returned from CHotKeyCtrl. Thanks again alot, you really helped me out.
Well ... Another possible solution this: Use GetForegroundWindow() and send him the WM_KEYDOWN message explicity. After a some days of thinking I haven't found any other workaround for this. :blush: Though I haven't seen any application so far that uses a normal key (like 'Q') as an system wide hotkey. Because such hotkeys are commonly used in combinition with Ctrl, Alt or Shift.
Re: I have a real problem with hooks
Thanks very much every body especially NoHero, SuperKoko and JohnCz I finally built up my first product on line you can download it from here
http://www.geocities.com/snakekain/
I had a hyprid solution from you it's to Setup a keyboad_LL hook and check for (alt, ctrl or shift) being down using GetAsyncKeyState inside the hook procedure that way you can format it with the CHotKeyCtrl.GetHotKey, Thanks every body again.