]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Added missing events
[wxWidgets.git] / src / msw / control.cpp
index 7dc54a51146a5c8129c57b655f3abeeda2cfbe91..fe571c753671fc628656dea267f785f099d343d8 100644 (file)
@@ -358,31 +358,9 @@ WXHBRUSH wxControl::MSWControlColor(WXHDC pDC)
 
     ::SetBkMode((HDC)pDC, TRANSPARENT);
 
 
     ::SetBkMode((HDC)pDC, TRANSPARENT);
 
-#if wxUSE_UXTHEME && wxUSE_NOTEBOOK
-    if ( wxUxThemeEngine::GetIfActive() )
-    {
-        for ( wxWindow *win = this; win; win = win->GetParent() )
-        {
-            if ( win->IsTopLevel() )
-            {
-                // don't go beyond the first top level parent
-                break;
-            }
-
-            wxNotebook *nbook = wxDynamicCast(win, wxNotebook);
-            if ( nbook )
-            {
-                // return value may be NULL but it is ok: if the first parent
-                // notebook doesn't use themes, then we don't have to process
-                // this message at all, so let default processing take place
-                return nbook->GetThemeBackgroundBrush(pDC, this);
-            }
-        }
-    }
-#endif // wxUSE_UXTHEME
+    hbr = MSWGetBgBrush(pDC);
 
 
-    // let the control deal with background itself
-    return MSWGetDefaultBgBrush();
+    return hbr ? hbr : MSWGetDefaultBgBrush();
 }
 
 WXHBRUSH wxControl::MSWControlColorDisabled(WXHDC pDC)
 }
 
 WXHBRUSH wxControl::MSWControlColorDisabled(WXHDC pDC)