GetKeyState(): How do I...
How do I interpret the return value from GetKeyState(). In particular I am trapping
for a <Ctrl-C> keyboard entry. I have trapped the WM_DOWNKEY message for
the 'C' part and now I have to look at the 'high-order' bit of the GetKeyState(VK_CONTROL)
return value to see if the <Ctrl> key was also depressed. How do I check the high-order
bit of the return value?
Thanks in advance for any help!
Eric
Re: GetKeyState(): How do I...
Answer:
GetKeyState(key) & 0x8000;
Reason:
The 0x8000 translates to "1000 0000 0000 0000" in binary. Note that the only "1" is the left-most bit (the high order bit).
Regards,
Paul McKenzie