]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
scrolling UPP moved
[wxWidgets.git] / src / msw / notebook.cpp
index a7eea971690ba1d1cd1567171051a937fccbbce5..e73853067695a35904562411e68d26c33f9ae508 100644 (file)
@@ -480,7 +480,7 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
     wxSize sizeTotal = sizePage;
 
     // We need to make getting tab size part of the wxWidgets API.
-    wxSize tabSize(0, 0);
+    wxSize tabSize;
     if (GetPageCount() > 0)
     {
         RECT rect;
@@ -627,7 +627,7 @@ bool wxNotebook::InsertPage(size_t nPage,
     }
 
     // and the text
-    if ( !strText.IsEmpty() )
+    if ( !strText.empty() )
     {
         tcItem.mask |= TCIF_TEXT;
         tcItem.pszText = (wxChar *)strText.c_str(); // const_cast
@@ -1002,6 +1002,33 @@ wxColour wxNotebook::MSWGetBgColourForChild(wxWindow *win)
     return c == CLR_INVALID ? wxNullColour : wxRGBToColour(c);
 }
 
+bool
+wxNotebook::MSWPrintChild(wxWindow *win,
+                          WXWPARAM wParam,
+                          WXLPARAM WXUNUSED(lParam))
+{
+    RECT rc;
+    ::GetClientRect(GetHwnd(), &rc);
+    TabCtrl_AdjustRect(GetHwnd(), true, &rc);
+    ::MapWindowPoints(GetHwnd(), GetHwndOf(win), (POINT *)&rc, 2);
+
+    wxUxThemeHandle theme(win, L"TAB");
+    if ( theme )
+    {
+        wxUxThemeEngine::Get()->DrawThemeBackground
+        (
+            theme,
+            (WXHDC)wParam,
+            9 /* TABP_PANE */,
+            0,
+            &rc,
+            NULL
+        );
+    }
+
+    return true;
+}
+
 #endif // wxUSE_UXTHEME
 
 // Windows only: attempts to get colour for UX theme page background