]> git.saurik.com Git - wxWidgets.git/commitdiff
let wxFRAME_EX_CONTEXTHELP override wxM{IN|AX}IMIZE_BOX as the latter are included...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 14 Jun 2006 18:27:55 +0000 (18:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 14 Jun 2006 18:27:55 +0000 (18:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 15e772930256e6496d05784aa08335ce91466fd9..d7bf04d4aa81a6865f1ee01b8e2a2f1c846cfaeb 100644 (file)
@@ -207,10 +207,19 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const
 #endif
 
     // next translate the individual flags
 #endif
 
     // next translate the individual flags
-    if ( style & wxMINIMIZE_BOX )
-        msflags |= WS_MINIMIZEBOX;
-    if ( style & wxMAXIMIZE_BOX )
-        msflags |= WS_MAXIMIZEBOX;
+
+    // WS_EX_CONTEXTHELP is incompatible with WS_MINIMIZEBOX and WS_MAXIMIZEBOX
+    // and is ignored if we specify both of them, but chances are that if we
+    // use wxFRAME_EX_CONTEXTHELP, we really do want to have the context help
+    // button while wxMINIMIZE/wxMAXIMIZE are included by default, so the help
+    // takes precedence
+    if ( !(GetExtraStyle() & wxFRAME_EX_CONTEXTHELP) )
+    {
+        if ( style & wxMINIMIZE_BOX )
+            msflags |= WS_MINIMIZEBOX;
+        if ( style & wxMAXIMIZE_BOX )
+            msflags |= WS_MAXIMIZEBOX;
+    }
 
 #ifndef __WXWINCE__
     if ( style & wxSYSTEM_MENU )
 
 #ifndef __WXWINCE__
     if ( style & wxSYSTEM_MENU )