allow using wxBG_STYLE_CUSTOM even with the native controls and use it in wxTreeCtrl (see #9832)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4722,6 +4722,14 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
|
||||
|
||||
void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
|
||||
{
|
||||
if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM )
|
||||
{
|
||||
// don't skip the event here, custom background means that the app
|
||||
// is drawing it itself in its OnPaint(), so don't draw it at all
|
||||
// now to avoid flicker
|
||||
return;
|
||||
}
|
||||
|
||||
// standard non top level controls (i.e. except the dialogs) always erase
|
||||
// their background themselves in HandleCtlColor() or have some control-
|
||||
// specific ways to set the colours (common controls)
|
||||
@@ -4731,14 +4739,6 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
if ( GetBackgroundStyle() == wxBG_STYLE_CUSTOM )
|
||||
{
|
||||
// don't skip the event here, custom background means that the app
|
||||
// is drawing it itself in its OnPaint(), so don't draw it at all
|
||||
// now to avoid flicker
|
||||
return;
|
||||
}
|
||||
|
||||
wxDC *dc = event.GetDC();
|
||||
if (!dc) return;
|
||||
wxMSWDCImpl *impl = (wxMSWDCImpl*) dc->GetImpl();
|
||||
|
Reference in New Issue
Block a user