> Hi, > > I want to build my own small frontend for MAME. But I don't know how to do > non-blocking keyboard and mouse requests on Windows XP. I am an old Saurier who can > only code in C, without classes and other high sophisticated things. To my time you > used kbhit, getch and sleep. All of them gone now. Now we have Megabytes of DirectX, > but how to use them. > > Is there anybody wo like to give me some hints? If it is offtopic here you can > contact me personally at hugo.simon(at)gmx.de. > > Thank you anybody > > Bluescreen
if you have windows.h included you can use GetKeyState() to get state of desired key, search msdn.com for it. this function allows to get state of a key at the moment function is called. there are also window messages WM_KEYDOWN and WM_KEYUP, send to window with keyboard focus.
|