X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7699361c96024e43b1a9158a98af0a45c1ccd49d..4c38c207775492ce1c1d54b695497b1814b928c1:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index a579355d50..bfe95ab1f7 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -59,7 +59,7 @@ #include "wx/msw/gnuwin32/extra.h" #endif -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) +#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) #include #endif @@ -2398,7 +2398,10 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) // similar to the ones from a "real" WM_KEYDOWN so that // CreateKeyEvent() works correctly WXLPARAM lParam = - (::GetKeyState(VK_MENU) & 0x100 ? KF_ALTDOWN : 0) << 16; +// (::GetKeyState(VK_MENU) & 0x100 ? KF_ALTDOWN : 0) << 16; + // Returns different negative values on WinME and WinNT, + // so simply test for negative value. + (::GetKeyState(VK_MENU) < 0 ? KF_ALTDOWN : 0) << 16; WXWPARAM wParam = info->wVKey;