X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f26f98eb58d08919e531b64cbe68a053eb5eaae..40b26d752de12e3e9f03172049c441de1a5e0276:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 914f6fe15d..d7bf04d4aa 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -24,9 +24,10 @@ #pragma hdrstop #endif +#include "wx/toplevel.h" + #ifndef WX_PRECOMP #include "wx/app.h" - #include "wx/toplevel.h" #include "wx/dialog.h" #include "wx/string.h" #include "wx/log.h" @@ -206,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 ) @@ -593,10 +603,14 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, MSWUpdateUIState(UIS_INITIALIZE); } + // Note: if we include PocketPC in this test, dialogs can fail to show up, + // for example the text entry dialog in the dialogs sample. Problem with Maximise()? +#if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__WINCE_STANDARDSDK__)) if ( ( style & wxMAXIMIZE ) || IsAlwaysMaximized() ) { this->Maximize(); } +#endif #if defined(__SMARTPHONE__) && defined(__WXWINCE__) SetRightMenu(); // to nothing for initialization