Hi, i'd just like to know what message a key creates when it is pressed eg.]
// in message que...
case /*what here? */:
// do something...]
Thanks
Hi, i'd just like to know what message a key creates when it is pressed eg.]
// in message que...
case /*what here? */:
// do something...]
Thanks
WM_KEYDOWN when the key is depressed, WM_KEYUP when it is released.
Hope this helps!
Jeff
So, if when a key is pressed, a WM_KEYDOWN message is entered into the message que, how do you test for different keys?
From MSDN
WM_KEYDOWN
nVirtKey = (int) wParam; // virtual-key code
lKeyData = lParam; // key data
nVirtKey
Specifies a virtual key. If the desired virtual key is a letter or digit (A through Z, a through z, or 0 through 9), nVirtKey must be set to the ASCII value of that character. For other keys, it must be a virtual-key code.
ie VK_ESCAPE
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
i could find the virtual key codes for everything on the keyboard except numbers and letters. how do i find the codes for those?
I'd assume VK_G for g, VK_4 for 4.
Probably not listed because they're too easy to guess :P
-out-
PsychoBrat
psychobrat at gmail
>>i could find the virtual key codes for everything on the keyboard except numbers and letters. how do i find the codes for those?
You could actually read my post.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill