From: Julian Smart Date: Wed, 27 Apr 2005 19:21:24 +0000 (+0000) Subject: Temporary fix (I hope) to allow an application to paint around controls X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5bf4788ae3dada6a5dbc8d18bb00bca320b8c4a7?ds=inline Temporary fix (I hope) to allow an application to paint around controls within static boxes by suspending the flicker reduction fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index ae9cb75ed0..88e485e64b 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -40,6 +40,7 @@ #include "wx/sysopt.h" #include "wx/image.h" #include "wx/dcmemory.h" +#include "wx/sysopt.h" #include "wx/msw/private.h" #include "wx/msw/missing.h" @@ -123,7 +124,8 @@ bool wxStaticBox::Create(wxWindow *parent, return false; #ifndef __WXWINCE__ - Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBox::OnPaint)); + if (!wxSystemOptions::IsFalse(wxT("msw.staticbox.optimized-paint"))) + Connect(wxEVT_PAINT, wxPaintEventHandler(wxStaticBox::OnPaint)); #endif // !__WXWINCE__ return true; @@ -143,7 +145,12 @@ WXDWORD wxStaticBox::MSWGetStyle(long style, WXDWORD *exstyle) const styleWin &= ~WS_CLIPCHILDREN; if ( exstyle ) - *exstyle = 0; + { + if (wxSystemOptions::IsFalse(wxT("msw.staticbox.optimized-paint"))) + *exstyle = WS_EX_TRANSPARENT; + else + *exstyle = 0; + } return styleWin | BS_GROUPBOX; }