Apr 3, 2013 at 9:25am UTC
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?
Apr 3, 2013 at 10:05am UTC
Thx Vidminas,
but in my program I cannot include window.h
it says intellisense can not include window.h
Apr 3, 2013 at 10:18am UTC
Maybe because it's #include <windows.h>
and you just misspelt it?
It's windows.h
not window.h
Last edited on Apr 3, 2013 at 10:19am UTC
Apr 3, 2013 at 11:10am UTC
yes you r right I misstype :))
thank you..
I try it tommorow because my real program is in the office. :)
Apr 3, 2013 at 4:46pm UTC
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
Apr 3, 2013 at 10:35pm UTC
Thank you .. you solve my problem