]> git.saurik.com Git - wxWidgets.git/commitdiff
don't show the accels on the controls if the system is configured to hide them initia...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 23:18:01 +0000 (23:18 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 23:18:01 +0000 (23:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/toplevel.cpp

index 7145774cae31b52e3dd42963d07b1d798c59b8af..1035ac295d7be2f8eaf8331d46d3ba5896a2d8b8 100644 (file)
@@ -153,6 +153,7 @@ wxMSW:
 - added wxTextCtrl::HitTest()
 - experimental wxURL implementation using WinInet functions (Hajo Kirchhoff)
 - fixed several bugs in wxNotebook with wxNB_MULTILINE style
+- accelerators are now initially hidden if appropriate (Peter Nielsen)
 
 wxGTK:
 
index 2376e815e60e42068218b739716bdbd1445c2a51..47bc5ff54a1bcf528ed52689350a1c64327f96ee 100644 (file)
@@ -41,6 +41,7 @@
 #include "wx/module.h"
 
 #include "wx/msw/private.h"
+#include "wx/msw/missing.h"
 
 #if defined(__WXWINCE__)
   #include <ole2.h>
@@ -514,6 +515,23 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
         EnableCloseButton(false);
     }
 
+    // for some reason we need to manually send ourselves this message as
+    // otherwise the mnemonics are always shown -- even if they're configured
+    // to be hidden until "Alt" is pressed in the control panel
+    //
+    // this could indicate a bug somewhere else but for now this is the only
+    // fix we have
+    if ( ret )
+    {
+        SendMessage
+        (
+            GetHwnd(),
+            WM_UPDATEUISTATE,
+            MAKEWPARAM(UIS_INITIALIZE, UISF_HIDEFOCUS | UISF_HIDEACCEL),
+            0
+        );
+    }
+
     return ret;
 }