From b8335252d21b92dbef2035309ec87ab78ce80d18 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 15 Nov 2004 19:15:53 +0000 Subject: [PATCH] don't draw background at all if bg style is custom git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 49c4a6c7c2..70f74831c8 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4070,6 +4070,13 @@ 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() + return; + } + if ( !m_hasBgCol ) { event.Skip(); -- 2.50.0