]> git.saurik.com Git - wxWidgets.git/commitdiff
Use GetBackgroundColour in the default OnEraseBackground so it can use
authorRobin Dunn <robin@alldunn.com>
Thu, 17 Jun 2004 21:36:32 +0000 (21:36 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 17 Jun 2004 21:36:32 +0000 (21:36 +0000)
the default if the colour hasn't been explicitly set

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 5c826bf7bca6513ce6b2cd504774404f8c77251e..62e779db4abbf9a8e8be52aac48900da0d0fa05a 100644 (file)
@@ -4099,10 +4099,11 @@ void wxWindowMSW::OnEraseBackground(wxEraseEvent& event)
 {
     RECT rect;
     ::GetClientRect(GetHwnd(), &rect);
-
-    COLORREF ref = PALETTERGB(m_backgroundColour.Red(),
-                              m_backgroundColour.Green(),
-                              m_backgroundColour.Blue());
+    
+    wxColour backgroundColour( /*m_backgroundColour*/ GetBackgroundColour());
+    COLORREF ref = PALETTERGB(backgroundColour.Red(),
+                              backgroundColour.Green(),
+                              backgroundColour.Blue());
     HBRUSH hBrush = ::CreateSolidBrush(ref);
     if ( !hBrush )
         wxLogLastError(wxT("CreateSolidBrush"));