get keyboard events
-
hi, maybe a dumbquestion... :omg: i want to know wenn a key is pressed in my dialog and witch key is pressed. how do i do it? thanks in advanced... Willem []D [] []D []
If you go into the Class Wizard under the message maps tab you can select WM_KEYDOWN or WM_KEYUP from the messages section. Once selected add a function to the event and edit the code in the function. The function takes in a parmeter called nChar. convert nChar to a regualr character by using something like
char myChar; myChar = char(nChar);
then to find what key was pressed you can do simple comparisons likeif (myChar =='A') { }
Michael Shuster Good Judgement comes from experience; Experience comes from bad judgement. -
hi, maybe a dumbquestion... :omg: i want to know wenn a key is pressed in my dialog and witch key is pressed. how do i do it? thanks in advanced... Willem []D [] []D []