X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5eae641dd681ecc837205ee84560b1cc89baf91f..b1f68ca3455436222b8704dccdecdb06087c4e7f:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index e3cb8dbc7b..c017a715f7 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -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