X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5297b7f4673c9d0217df4342e5540cf62d245d7..2659dad3209167f248dcae39a7ee25d2f8c91ff9:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index c6dee1ec13..659e65db10 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -114,7 +114,7 @@ #include "wx/msw/gnuwin32/extra.h" #endif -#if defined(__GNUG__) +#if defined(__GNUG__) || defined(__DMC__) #include "wx/msw/missing.h" #endif @@ -2400,7 +2400,8 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam wParam); break; -#ifndef __WXWINCE__ + // Seems to be broken currently +#if 0 // ndef __WXWINCE__ case WM_MOUSELEAVE: { wxASSERT_MSG( !m_mouseInWindow, wxT("the mouse should be in a window to generate this event!") ); @@ -4396,7 +4397,7 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags) { // Generate an ENTER event m_mouseInWindow = TRUE; - +#if _WIN32_WINNT >= 0x0400 #ifndef __WXWINCE__ TRACKMOUSEEVENT trackinfo; @@ -4408,7 +4409,7 @@ bool wxWindowMSW::HandleMouseMove(int x, int y, WXUINT flags) // else we need _WIN32_WINNT >= 0x0400 _TrackMouseEvent(&trackinfo); #endif - +#endif wxMouseEvent event(wxEVT_ENTER_WINDOW); InitMouseEvent(event, x, y, flags); @@ -5056,6 +5057,18 @@ int wxCharCodeWXToMSW(int id, bool *isVirtual) return keySym; } +bool wxGetKeyState(wxKeyCode key) +{ + bool bVirtual; + int vkey = wxCharCodeWXToMSW(key, &bVirtual); + + //there aren't WXK_ macros for non-virtual key codes + if (bVirtual == false) + return false; + + return GetKeyState(vkey) < 0; +} + wxWindow *wxGetActiveWindow() { HWND hWnd = GetActiveWindow();