Applied patch [ 740012 ] GetKeyState returns 16-Bit value on WindowsNT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20683 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -286,12 +286,18 @@ HCURSOR wxBitmapToHCURSOR(const wxBitmap& bmp, int hotSpotX, int hotSpotY);
|
||||
// get the current state of SHIFT/CTRL keys
|
||||
inline bool wxIsShiftDown()
|
||||
{
|
||||
return (::GetKeyState(VK_SHIFT) & 0x100) != 0;
|
||||
// return (::GetKeyState(VK_SHIFT) & 0x100) != 0;
|
||||
// Returns different negative values on WinME and WinNT,
|
||||
// so simply test for negative value.
|
||||
return ::GetKeyState(VK_SHIFT) < 0;
|
||||
}
|
||||
|
||||
inline bool wxIsCtrlDown()
|
||||
{
|
||||
return (::GetKeyState(VK_CONTROL) & 0x100) != 0;
|
||||
// return (::GetKeyState(VK_CONTROL) & 0x100) != 0;
|
||||
// Returns different negative values on WinME and WinNT,
|
||||
// so simply test for negative value.
|
||||
return ::GetKeyState(VK_CONTROL) < 0;
|
||||
}
|
||||
|
||||
// wrapper around GetWindowRect() and GetClientRect() APIs doing error checking
|
||||
|
Reference in New Issue
Block a user