if (KEY_DOWN(vk_code))
{
while (!KEY_UP(vk_code))
{
// do action while key is down and not up
}
// do whatever when key is let go
// Suggest doing this to flush the standard input...
Type: Posts; User: Divx
if (KEY_DOWN(vk_code))
{
while (!KEY_UP(vk_code))
{
// do action while key is down and not up
}
// do whatever when key is let go
// Suggest doing this to flush the standard input...
The virtual key codes are found in winuser.h (which including windows.h will include)
Here are a couple of macros you can use to check the state of a key.
KEY_DOWN(vk_code)...