all groups > visual c > january 2007 >
You're in the

visual c

group:

Need to know if dialog input is from the main keyboard keys


Need to know if dialog input is from the main keyboard keys Frank
1/31/2007 10:18:42 AM
visual c:
In a dialog box procedure is there a way to determine if keyboard input is
from the keypad or the arrow keys?

I need to know if the input is from the main keyboard keys.


Thanks

Re: Need to know if dialog input is from the main keyboard keys Frank
1/31/2007 2:00:32 PM
thanks

[quoted text, click to view]

Re: Need to know if dialog input is from the main keyboard keys Bruno van Dooren [MVP VC++]
1/31/2007 6:44:41 PM
[quoted text, click to view]

I think you can do this by monitoring the low level keyboard message while
they are sent to your app.
If I recall correctly, they have different scancodes.
The easiest way to test is to install a low level keyboard hook and watch
what is coming by when you press the different keys between which you want
to distinguish.
Mybe it is also possible by monitoring the window messages themselves with a
Message hook.

Have a look at SetWindowsHookEx
I think that is a good starting point.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"

AddThis Social Bookmark Button