if ( !MSWCreateControl(className, wxEmptyString, pos, size) )
return false;
+ if (HasFlag(wxNB_NOPAGETHEME) || (wxSystemOptions::HasOption(wxT("msw.notebook.themed-background")) &&
+ wxSystemOptions::GetOptionInt(wxT("msw.notebook.themed-background")) == 0))
+ {
+ wxColour col = GetThemeBackgroundColour();
+ if (col.Ok())
+ {
+ SetBackgroundColour(col);
+ }
+ }
return true;
}
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;
}
// and the text
- if ( !strText.IsEmpty() )
+ if ( !strText.empty() )
{
tcItem.mask |= TCIF_TEXT;
tcItem.pszText = (wxChar *)strText.c_str(); // const_cast
InvalidateBestSize();
- if (HasFlag(wxNB_NOPAGETHEME) || (wxSystemOptions::HasOption(wxT("msw.notebook.themed-background")) &&
- wxSystemOptions::GetOptionInt(wxT("msw.notebook.themed-background")) == 0))
- {
- wxColour col = GetThemeBackgroundColour();
- if (col.Ok())
- {
- pPage->SetBackgroundColour(col);
- }
- }
-
return true;
}
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