- // do default background painting
- if ( !DoEraseBackground(GetHdcOf(*event.GetDC())) )
- {
- // let the system paint the background
- event.Skip();
+ case 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;
+
+ case wxBG_STYLE_TRANSPARENT:
+ event.Skip();