]> git.saurik.com Git - wxWidgets.git/commitdiff
never return NULL_BRUSH from WM_CTLCOLOR handler, it doesn't do much for most control...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Dec 2004 00:06:43 +0000 (00:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Dec 2004 00:06:43 +0000 (00:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30937 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/control.h
src/msw/control.cpp

index c3bd297ea4c134d617aa71d32488c581629a05ef..574d84a74b1dfa94307ad9f58faa6319ee24d88e 100644 (file)
@@ -133,14 +133,6 @@ protected:
     // common part of the 3 methods above
     WXHBRUSH MSWControlColorSolid(WXHDC pDC, wxColour colBg);
 
-    // another WM_CTLCOLOR-related function: if it returns false, we return
-    // NULL_BRUSH from MSWControlColor() to prevent the system from erasing the
-    // background at all
-    //
-    // override this function to return true for controls which do want to
-    // draw their background themselves
-    virtual bool MSWAlwaysDrawBg() const { return false; }
-
     // this is a helper for the derived class GetClassDefaultAttributes()
     // implementation: it returns the right colours for the classes which
     // contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of
index 96547014e943bb3464b074ec8bfd91681038ab06..8a8bbee16dcbae3a36ccfca671a4c13ede9bb682 100644 (file)
@@ -371,7 +371,8 @@ WXHBRUSH wxControl::MSWControlColor(WXHDC pDC)
     }
 #endif // wxUSE_UXTHEME
 
-    return MSWAlwaysDrawBg() ? 0 : ::GetStockObject(NULL_BRUSH);
+    // let the control deal with background itself
+    return 0;
 }
 
 WXHBRUSH wxControl::MSWControlColorDisabled(WXHDC pDC)