X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2b7be7ad53d6147287ca97807774824167ddd0d..2d17efa94e68c37fb415cf530daa558692ab7c2d:/src/msw/notebook.cpp?ds=sidebyside diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index a7eea97169..e738530676 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -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