X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bffa02ff6fc8b0f66d6486a965c45804a7f50e33..e4b712e2455dfc6e5303c428119b435d8d6182ed:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 31a435f2a4..e4ef38d0d2 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); } }; @@ -479,9 +486,7 @@ private: // global data // --------------------------------------------------------------------------- -WXDLLEXPORT_DATA(extern wxChar*) wxBuffer; - -WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; +WXDLLIMPEXP_DATA_BASE(extern HINSTANCE) wxhInstance; // --------------------------------------------------------------------------- // global functions @@ -489,10 +494,10 @@ WXDLLEXPORT_DATA(extern HINSTANCE) wxhInstance; extern "C" { - WXDLLEXPORT HINSTANCE wxGetInstance(); + WXDLLIMPEXP_BASE HINSTANCE wxGetInstance(); } -WXDLLEXPORT void wxSetInstance(HINSTANCE hInst); +WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); #if wxUSE_GUI