amby
asked on
how to get the state of mouse buttons
I need to know the state of the left mouse button when handling a WM_NCMOUSEMOVE (WM_NCMOUSEUP is not sent after a WM_NCMOUSEDOWN, SetCapture() changes nothing)
how to get the state (through API or not...)
how to get the state (through API or not...)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please note: (I am not sure if it is also true for GetKeyState. You may test it.)
The GetAsyncKeyState function works with mouse buttons. However, it checks on the state of the physical mouse buttons, not on the logical mouse buttons that the physical buttons are mapped to. For example, the call GetAsyncKeyState(VK_LBUTTO
GetSystemMetrics(SM_SWAPBU
which returns TRUE if the mouse buttons have been swapped.