]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Expression simplifications for scaling and inflating.
[wxWidgets.git] / src / msw / notebook.cpp
index 3741960c93090267e12eb41e8b5f219514ca04f4..eef37234b2465b4e709b8305d428ea96a1b789c0 100644 (file)
@@ -25,6 +25,7 @@
 // wxWidgets
 #ifndef WX_PRECOMP
   #include  "wx/string.h"
 // wxWidgets
 #ifndef WX_PRECOMP
   #include  "wx/string.h"
+  #include  "wx/dc.h"
 #endif  // WX_PRECOMP
 
 #include  "wx/log.h"
 #endif  // WX_PRECOMP
 
 #include  "wx/log.h"
@@ -909,19 +910,23 @@ WXHBRUSH wxNotebook::GetThemeBackgroundBrush(WXHDC hDC, wxWindow *win) const
 }
 
 void wxNotebook::DoEraseBackground(wxEraseEvent& event)
 }
 
 void wxNotebook::DoEraseBackground(wxEraseEvent& event)
+{
+    DoEraseBackground((wxWindow *)event.GetEventObject(),
+                      (WXHDC)GetHdcOf(*event.GetDC()));
+}
+
+void wxNotebook::DoEraseBackground(wxWindow *win, WXHDC hDC)
 {
     // we can either draw the background ourselves or let DrawThemeBackground()
     // do it, but as we already have the correct brush, let's do it ourselves
     // (note that we use the same code in wxControl::MSWControlColor(), so if
     // it breaks, it should at least break in consistent way)
 {
     // we can either draw the background ourselves or let DrawThemeBackground()
     // do it, but as we already have the correct brush, let's do it ourselves
     // (note that we use the same code in wxControl::MSWControlColor(), so if
     // it breaks, it should at least break in consistent way)
-    wxWindow *win = (wxWindow *)event.GetEventObject();
-    HDC hdc = GetHdcOf(*event.GetDC());
-    WXHBRUSH hbr = GetThemeBackgroundBrush((WXHDC)hdc, win);
+    WXHBRUSH hbr = GetThemeBackgroundBrush(hDC, win);
     if ( hbr )
     {
         RECT rectClient;
         ::GetClientRect(GetHwndOf(win), &rectClient);
     if ( hbr )
     {
         RECT rectClient;
         ::GetClientRect(GetHwndOf(win), &rectClient);
-        ::FillRect(hdc, &rectClient, (HBRUSH)hbr);
+        ::FillRect((HDC)hDC, &rectClient, (HBRUSH)hbr);
     }
 }
 
     }
 }