Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / January 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank - 31 Jan 2007 15:18 GMT
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
Bruno van Dooren [MVP VC++] - 31 Jan 2007 17:44 GMT
> 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.

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.

Signature

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

Frank - 31 Jan 2007 19:00 GMT
thanks

>> In a dialog box procedure is there a way to determine if keyboard input
>> is from the keypad or the arrow keys?
[quoted text clipped - 12 lines]
> Have a look at SetWindowsHookEx
> I think that is a good starting point.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.