virtual wxSize DoGetBestSize() const;
+ // under XP when using "transition effect for menus and tooltips" if we
+ // return true for WM_PRINTCLIENT here then it causes noticable slowdown
+ virtual bool MSWShouldPropagatePrintChild()
+ {
+ return false;
+ }
+
#if wxUSE_OWNER_DRAWN
// control items
wxListBoxItemsArray m_aItems;
return false;
}
+ // some controls (e.g. wxListBox) need to set the return value themselves
+ //
+ // return true to let parent handle it if we don't, false otherwise
+ virtual bool MSWShouldPropagatePrintChild()
+ {
+ return true;
+ }
+
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);
return false;
}
- // Necessary to prevent scroll problems within a notebook with Windows
- // effects enabled
- SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
-
// initialize the contents
for ( int i = 0; i < n; i++ )
{
if ( IsTopLevel() || InheritsBackgroundColour() )
return false;
+ // sometimes we don't want the parent to handle it at all, instead
+ // return whatever value this window wants
+ if ( !MSWShouldPropagatePrintChild() )
+ return MSWPrintChild(hDC, (wxWindow *)this);
+
for ( wxWindow *win = GetParent(); win; win = win->GetParent() )
{
if ( win->MSWPrintChild(hDC, (wxWindow *)this) )