]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
don't erase background in wxControl neither
[wxWidgets.git] / src / msw / window.cpp
index 49c4a6c7c2faf6bddfec0b1a128faaac7a9621f3..70f74831c8063ff4a9a0abfaa43c4a2971bfc0f8 100644 (file)
@@ -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();