X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bffa02ff6fc8b0f66d6486a965c45804a7f50e33..7d5848668df9cd29d08c81b43ff459da946a21e4:/include/wx/msw/private.h

diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h
index 31a435f2a4..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
@@ -338,7 +344,8 @@ struct WinStruct : public T
 {
     WinStruct()
     {
-        ::ZeroMemory(this, cbSize = sizeof(T));
+        ::ZeroMemory(this, sizeof(T));
+        cbSize = sizeof(T);
     }
 };