]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/toplevel.cpp
[ 1492053 ] Add wxVListBox style callbacks to wxOwnerDrawnComboBox.
[wxWidgets.git] / 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
-    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 )