keypress in dialog form

hi,

I want to control robot, using keyboard, for example if I press s the robot will move forward, z will move backward.

I use visual studio 2010, class library, with dialog form

I found ON_WM_XBUTTONDOWN()
but I have tried and not working.

can some one give me an idea?
On Windows: GetAsyncKeyState and this http://msdn.microsoft.com/en-us/library/dd375731(VS.85).aspx
Thx Vidminas,

but in my program I cannot include window.h
it says intellisense can not include window.h
Maybe because it's #include <windows.h> and you just misspelt it?

It's windows.h not window.h
Last edited on
yes you r right I misstype :))

thank you..

I try it tommorow because my real program is in the office. :)
And by the way as an example for Z and S:
for S if (GetAsyncKeyState(0x53) != 0) //code to move forward
for Z if (GetAsyncKeyState(0x5A) != 0) //code to move back
Thank you .. you solve my problem
Topic archived. No new replies allowed.