// creates the brush to be used for drawing the tab control background
void UpdateBgBrush();
+
+ // paint themed children background here
+ virtual bool MSWPrintChild(wxWindow *win, WXWPARAM wParam, WXLPARAM lParam);
#endif // wxUSE_UXTHEME
// the current selection (-1 if none)
// windows via their MSWGetBgBrushForChild() recursively
WXHBRUSH MSWGetBgBrush(WXHDC hDC);
+ // overriding this method gives the parent window the opportunity to
+ // process WM_PRINTCLIENT for its children: this is currently used by
+ // wxNotebook to draw themed background for them
+ //
+ // return true if the message was processed or false to use default logic
+ // for it (currently this means handling it just as WM_PAINT i.e. render
+ // the control into the provided DC)
+ virtual bool MSWPrintChild(wxWindow *win, WXWPARAM wParam, WXLPARAM lParam);
+
+
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
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
}
#ifdef WM_PRINT
+ case WM_PRINTCLIENT:
+ if ( GetParent() &&
+ GetParent()->MSWPrintChild(this, wParam, lParam) )
+ {
+ processed = true;
+ }
+ break;
+
case WM_PRINT:
{
if ( lParam & PRF_ERASEBKGND )
HandleEraseBkgnd((WXHDC)(HDC)wParam);
wxPaintDCEx dc((wxWindow *)this, (WXHDC)wParam);
+
processed = HandlePaint();
}
break;
return 0;
}
+bool
+wxWindowMSW::MSWPrintChild(wxWindow * WXUNUSED(win),
+ WXWPARAM WXUNUSED(wParam),
+ WXLPARAM WXUNUSED(lParam))
+{
+ return false;
+}
+
// ---------------------------------------------------------------------------
// moving and resizing
// ---------------------------------------------------------------------------