bogus readings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31052
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// changed by the time the OnInternalIdle function is called, so 'state'
// may be meaningless.
int state = 0;
// changed by the time the OnInternalIdle function is called, so 'state'
// may be meaningless.
int state = 0;
state |= MK_SHIFT;
if ( wxIsCtrlDown() )
state |= MK_CONTROL;
state |= MK_SHIFT;
if ( wxIsCtrlDown() )
state |= MK_CONTROL;
- if ( GetKeyState( VK_LBUTTON ) )
+
+ // Only the high-order bit should be tested
+ if ( GetKeyState( VK_LBUTTON ) & (1<<15) )
- if ( GetKeyState( VK_MBUTTON ) )
+ if ( GetKeyState( VK_MBUTTON ) & (1<<15) )
- if ( GetKeyState( VK_RBUTTON ) )
+ if ( GetKeyState( VK_RBUTTON ) & (1<<15) )
state |= MK_RBUTTON;
POINT pt;
state |= MK_RBUTTON;
POINT pt;