]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
fixed wxEVT_CONTEXT_MENU generation (it works differently under w2k/XP than under...
[wxWidgets.git] / src / msw / toplevel.cpp
index 7f9e9ade6d07de6c49f10cd8f273bc2f2e2e3a1a..47bc5ff54a1bcf528ed52689350a1c64327f96ee 100644 (file)
 #include "wx/module.h"
 
 #include "wx/msw/private.h"
+#include "wx/msw/missing.h"
 
 #if defined(__WXWINCE__)
   #include <ole2.h>
   #include <shellapi.h>
-  #include <aygshell.h>
+  #if _WIN32_WCE < 400
+    #include <aygshell.h>
+  #endif
+#include "wx/msw/wince/missing.h"
 #endif
 
 #include "wx/msw/winundef.h"
@@ -511,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;
 }
 
@@ -737,7 +758,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
                      rect.x, rect.y, rect.width, rect.height,
                      flags);
 
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
         ::SHFullScreen(GetHwnd(), SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON);
 #endif
 
@@ -747,7 +768,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
     }
     else // stop showing full screen
     {
-#ifdef __WXWINCE__
+#if defined(__WXWINCE__) && _WIN32_WCE < 400
         ::SHFullScreen(GetHwnd(), SHFS_SHOWTASKBAR | SHFS_SHOWSIPBUTTON);
 #endif
         Maximize(m_fsIsMaximized);