Help on GetAsyncKeyState(...)
-
Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.
-
Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.
See
SHORT nState = GetAsyncKeyState(VK_TAB); BOOL bTab = (nState & 0x9000); if(bTab) MessageBox("A");
_**
**_
whitesky
-
Hi all, How to Use GetAsyncKeyState(..) Api, Please provide a snippet of code. And what is the Difference between GetKeyState(...) and GetAsyncKeyState(...) uday.
Hi,:-D The key status returned from GetKeyState function changes as a specified thread reads key messages from its message queue. The status does not reflect the interrupt-level state associated with the hardware. Use the GetAsyncKeyState function to retrieve that information. :) "Dream bigger...Do bigger...Expect smaller" aji
-
See
SHORT nState = GetAsyncKeyState(VK_TAB); BOOL bTab = (nState & 0x9000); if(bTab) MessageBox("A");
_**
**_
whitesky
hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.
-
hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.
Their is no need to know the hex values of the corssponding keys :- U can use the VK_ and the second one is the corssponding Hex value.
VK_SHIFT 10 SHIFT key VK_CONTROL 11 CTRL key
Regards, FarPointer Blog:FARPOINTER -
hi WhiteSky, I want to know which key i have entered. In the above example you supplied 0x9000 for tab Control. Tab-Control --> 0x9000. Shift-Control ---> ? Ctrl-Control ---> I want to know Shift-Control,Ctrl-Control Keys. please help me out. uday.
See
Virtual-Key Codes
in GetAsyncKeyState_**
**_
whitesky