+
+void MyHtmlWindow::OnEraseBgEvent(wxEraseEvent& event)
+{
+ if ( !m_drawCustomBg )
+ {
+ event.Skip();
+ return;
+ }
+
+ // draw a background grid to show that this handler is indeed executed
+
+ wxDC& dc = *event.GetDC();
+ dc.SetPen(*wxBLUE_PEN);
+ dc.Clear();
+
+ const wxSize size = GetVirtualSize();
+ for ( int x = 0; x < size.x; x += 15 )
+ {
+ dc.DrawLine(x, 0, x, size.y);
+ }
+
+ for ( int y = 0; y < size.y; y += 15 )
+ {
+ dc.DrawLine(0, y, size.x, y);
+ }
+}
+