X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5297b7f4673c9d0217df4342e5540cf62d245d7..5c250a10332dc17263c66deb629b5fa8c4320f8a:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index c6dee1ec13..51c815981d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -114,52 +114,12 @@ #include "wx/msw/gnuwin32/extra.h" #endif -#if defined(__GNUG__) #include "wx/msw/missing.h" -#endif #if defined(__WXWINCE__) #include "wx/msw/wince/missing.h" #endif -// ---------------------------------------------------------------------------- -// standard constants not available with all compilers/headers -// ---------------------------------------------------------------------------- - -// This didn't appear in mingw until 2.95.2 -#ifndef SIF_TRACKPOS -#define SIF_TRACKPOS 16 -#endif - -#if wxUSE_MOUSEWHEEL - #ifndef WM_MOUSEWHEEL - #define WM_MOUSEWHEEL 0x020A - #endif - #ifndef WHEEL_DELTA - #define WHEEL_DELTA 120 - #endif - #ifndef SPI_GETWHEELSCROLLLINES - #define SPI_GETWHEELSCROLLLINES 104 - #endif -#endif // wxUSE_MOUSEWHEEL - -#ifndef VK_OEM_1 - #define VK_OEM_1 0xBA - #define VK_OEM_2 0xBF - #define VK_OEM_3 0xC0 - #define VK_OEM_4 0xDB - #define VK_OEM_5 0xDC - #define VK_OEM_6 0xDD - #define VK_OEM_7 0xDE -#endif - -#ifndef VK_OEM_COMMA - #define VK_OEM_PLUS 0xBB - #define VK_OEM_COMMA 0xBC - #define VK_OEM_MINUS 0xBD - #define VK_OEM_PERIOD 0xBE -#endif - // --------------------------------------------------------------------------- // global variables // --------------------------------------------------------------------------- @@ -1853,10 +1813,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) switch ( msg->wParam ) { case VK_TAB: - // assume that nobody wants Shift-TAB for himself - if we - // don't do it there is no easy way for a control to grab - // TABs but still let Shift-TAB work as navugation key - if ( (lDlgCode & DLGC_WANTTAB) && !bShiftDown ) { + if ( lDlgCode & DLGC_WANTTAB ) { bProcess = FALSE; } else { @@ -2400,7 +2357,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 +4354,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 +4366,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 +5014,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();