From: Vadim Zeitlin Date: Fri, 30 Nov 2007 17:46:36 +0000 (+0000) Subject: use WS_SYSMENU if wxCLOSE_BOX style is given, otherwise the close box doesn't appear X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2ccc5f110f4bd5e2fe2d400c2b3990f45dc1bcb3 use WS_SYSMENU if wxCLOSE_BOX style is given, otherwise the close box doesn't appear git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 712dce2272..7c9fd6c588 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -221,9 +221,11 @@ WXDWORD wxTopLevelWindowMSW::MSWGetStyle(long style, WXDWORD *exflags) const } #ifndef __WXWINCE__ - if ( style & wxSYSTEM_MENU ) + // notice that if wxCLOSE_BOX is specified we need to use WS_SYSMENU too as + // otherwise the close box doesn't appear + if ( style & (wxSYSTEM_MENU | wxCLOSE_BOX) ) msflags |= WS_SYSMENU; -#endif +#endif // !__WXWINCE__ // NB: under CE these 2 styles are not supported currently, we should // call Minimize()/Maximize() "manually" if we want to support them