DIMOUSESTATE2
how to know which button is press?
LONG lX;
LONG lY;
LONG lZ;
BYTE rgbButtons[8];
rgbButtons
Array of buttons. The high-order bit of the byte is set if the corresponding button is down.
msdn is ambiguity.
You just to it like any other DInput state:
When they say "high-order bit is set", just do the "& 0x80" test on it.
if( myState.rgbButtons[0] & 0x80 ){ // Button 0 is down}
When they say "high-order bit is set", just do the "& 0x80" test on it.
Quote:Original post by circlesoft
You just to it like any other DInput state:if( myState.rgbButtons[0] & 0x80 ){ // Button 0 is down}
When they say "high-order bit is set", just do the "& 0x80" test on it.
thank but I want to which index is left button ,middle button ,right button.
Hi,
I think rgbButtons[0] should be the left button and rgbButtons[1] should be the right button. I'm not sure about the middle button, maybe rgbButtons[2]? If not you can still find out by trial and error.
Vore
I think rgbButtons[0] should be the left button and rgbButtons[1] should be the right button. I'm not sure about the middle button, maybe rgbButtons[2]? If not you can still find out by trial and error.
Vore
Quote:Original post by Dave Hunt
If I remember correctly, 0 is left, 1 is right, and 2 is middle as vore2005 indicated.
I can confirm that. The rest of the layout depends on the mouse itself.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement