]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Avoid outputting the assert message twice in non-GUI code.
[wxWidgets.git] / src / msw / window.cpp
index b518542e20d10142c1d429930a71df0a31aa076b..bad095f9e9eb1e13f827bf3550c410f7715271d3 100644 (file)
@@ -724,6 +724,9 @@ wxWindowMSW::MSWShowWithEffect(bool show,
                                wxShowEffect effect,
                                unsigned timeout)
 {
+    if ( effect == wxSHOW_EFFECT_NONE )
+        return Show(show);
+
     if ( !wxWindowBase::Show(show) )
         return false;
 
@@ -4751,15 +4754,10 @@ void wxWindowMSW::OnPaint(wxPaintEvent& event)
 
 bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
 {
-    // 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)
-    if ( IsOfStandardClass() && !IsTopLevel() )
-        return false;
-
     switch ( GetBackgroundStyle() )
     {
         case wxBG_STYLE_ERASE:
+        case wxBG_STYLE_COLOUR:
             // we need to generate an erase background event
             {
                 wxDCTemp dc(hdc, GetClientSize());
@@ -4778,7 +4776,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
 
                 if ( rc )
                 {
-                    // background erase by the user-defined handler
+                    // background erased by the user-defined handler
                     return true;
                 }
             }
@@ -4794,6 +4792,7 @@ bool wxWindowMSW::HandleEraseBkgnd(WXHDC hdc)
             break;
 
         case wxBG_STYLE_PAINT:
+        case wxBG_STYLE_TRANSPARENT:
             // no need to do anything here at all, background will be entirely
             // redrawn in WM_PAINT handler
             break;