Just clearing the DC is not enough when the window is scrolled, so clear the
entire virtual area. We should be able to optimize it by clearing just the
rectangle currently scrolled into view but this is at least correct, i.e.
doesn't result in corrupted display, even if it's suboptimal.
See #14917.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73493
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( m_eraseBgInPaint )
{
dc.SetBackground(*wxLIGHT_GREY);
if ( m_eraseBgInPaint )
{
dc.SetBackground(*wxLIGHT_GREY);
+
+ // Erase the entire virtual area, not just the client area.
+ dc.SetPen(*wxTRANSPARENT_PEN);
+ dc.SetBrush(GetBackgroundColour());
+ dc.DrawRectangle(GetVirtualSize());
dc.DrawText("Background erased in OnPaint", 65, 110);
}
dc.DrawText("Background erased in OnPaint", 65, 110);
}