|
-
April 29th, 1999, 11:29 AM
#1
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
-
April 29th, 1999, 01:02 PM
#2
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|