X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2f6c54eb076d760cbb6fb15e899f15fbbd575850..4b04699b670b4ab4632229fa0264d154acd3bec1:/samples/erase/erase.cpp diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 9f159bbebc..d9f5cfc041 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -74,6 +74,8 @@ public: void OnPaint( wxPaintEvent &event ); void OnEraseBackground( wxEraseEvent &event ); + + wxBitmap m_bitmap; private: DECLARE_EVENT_TABLE() @@ -174,6 +176,10 @@ MyCanvas::MyCanvas( MyFrame *parent ) wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER ) { SetScrollbars( 10, 10, 40, 100, 0, 0 ); + + m_bitmap = wxBitmap( mondrian_xpm ); + + new wxStaticBitmap( this, -1, m_bitmap, wxPoint(80,20) ); } void MyCanvas::OnPaint( wxPaintEvent &event ) @@ -181,6 +187,11 @@ void MyCanvas::OnPaint( wxPaintEvent &event ) wxPaintDC dc(this); PrepareDC( dc ); + dc.SetBrush( *wxBLACK_BRUSH ); + dc.DrawRectangle( 0,0,200,50 ); + + dc.DrawBitmap( m_bitmap, 10, 20, TRUE ); + #if 0 wxRegionIterator upd( GetUpdateRegion() ); while (upd)