]> git.saurik.com Git - wxWidgets.git/commitdiff
(blind) fix for keyboard cues display under XP (bug 1298512)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Sep 2005 11:08:42 +0000 (11:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Sep 2005 11:08:42 +0000 (11:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/missing.h
include/wx/msw/window.h
src/msw/toplevel.cpp
src/msw/window.cpp

index cbedea9379eb1112db4a9e3190425d689c2f3f74..a27be621c674d1b547b9a06cff783d8e6f13f683 100644 (file)
@@ -39,7 +39,9 @@
 #endif
 
 // Needed by toplevel.cpp
-#ifndef UIS_INITIALIZE
+#ifndef UIS_SET
+    #define UIS_SET         1
+    #define UIS_CLEAR       2
     #define UIS_INITIALIZE  3
 #endif
 
index 8f549b94d646a7acd43f575a452f1d8ebedd7ed5..c727eda2e3a14abf38981cccd9952b7cc0342d73 100644 (file)
@@ -488,7 +488,9 @@ protected:
     bool DoEraseBackground(WXHDC hDC);
 
     // generate WM_UPDATEUISTATE if it's needed for the OS we're running under
-    void MSWUpdateUIState();
+    //
+    // the parameter should be one of UIS_XXX constants
+    void MSWUpdateUIState(int action);
 
 private:
     // common part of all ctors
index 83212f896e74182a3b23da85eefc692d14b6fddd..82f995b9f47abd1c7419e89c1ffde20b54a418a1 100644 (file)
@@ -529,7 +529,7 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
     // focus rectangles) work under Win2k+
     if ( ret )
     {
-        MSWUpdateUIState();
+        MSWUpdateUIState(UIS_INITIALIZE);
     }
 
     // Note: if we include PocketPC in this test, dialogs can fail to show up,
index ee785b62e6f14406dc6add4a8cc60f7ec7ad77ae..81bf8d24655b306a517575ed19cbb672a2aa8922 100644 (file)
@@ -806,7 +806,7 @@ void wxWindowMSW::WarpPointer(int x, int y)
     }
 }
 
-void wxWindowMSW::MSWUpdateUIState()
+void wxWindowMSW::MSWUpdateUIState(int action)
 {
     // WM_UPDATEUISTATE only appeared in Windows 2000 so it can do us no good
     // to use it on older systems -- and could possibly do some harm
@@ -824,8 +824,7 @@ void wxWindowMSW::MSWUpdateUIState()
         //     include just one UISF_XXX or both, both are affected, no idea
         //     why
         ::SendMessage(GetHwnd(), WM_UPDATEUISTATE,
-                        MAKEWPARAM(UIS_INITIALIZE,
-                                   UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
+                      MAKEWPARAM(action, UISF_HIDEFOCUS | UISF_HIDEACCEL), 0);
     }
 }
 
@@ -2084,7 +2083,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
                     // this by default, we need to manually send this message
                     // so that controls could change their appearance
                     // appropriately
-                    MSWUpdateUIState();
+                    MSWUpdateUIState(UIS_CLEAR);
 
                     return true;
                 }