]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
CoreGraphics dev
[wxWidgets.git] / src / msw / notebook.cpp
index e6a0aaae7cce0a9adc26751f04def6307efc0f3b..fc9766e716757d68b4af33ba264a6f7942993d8a 100644 (file)
@@ -679,6 +679,10 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
 
 void wxNotebook::OnSize(wxSizeEvent& event)
 {
+#if wxUSE_UXTHEME
+  UpdateBgBrush();
+#endif // wxUSE_UXTHEME
+
   // fit the notebook page to the tab control's display area
   RECT rc;
   rc.left = rc.top = 0;
@@ -717,10 +721,6 @@ void wxNotebook::OnSize(wxSizeEvent& event)
     pPage->SetSize(rc.left, rc.top, width, height);
   }
 
-#if wxUSE_UXTHEME
-  UpdateBgBrush();
-#endif // wxUSE_UXTHEME
-
   event.Skip();
 }
 
@@ -881,10 +881,9 @@ WXHANDLE wxNotebook::QueryBgBitmap(wxWindow *win)
 
         return (WXHANDLE)c;
     }
-    else // we are asked to create the brush
-    {
-        return (WXHANDLE)::CreatePatternBrush(hBmp);
-    }
+
+    // else we are asked to create the brush
+    return (WXHANDLE)::CreatePatternBrush(hBmp);
 }
 
 void wxNotebook::UpdateBgBrush()