X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b18eb01cd1eec13d5b4b31992c535b25c9f5db6d..54e18afcca6b75bfaf9dd1f12f4a255df8ae089d:/samples/erase/erase.cpp diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 8a00632083..94dd570ec4 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -17,11 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "erase.cpp" - #pragma interface "erase.cpp" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -122,6 +117,9 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + MyFrame *frame = new MyFrame; frame->Show(true); @@ -213,7 +211,7 @@ MyCanvas::MyCanvas( wxFrame *parent ) m_bitmap = wxBitmap( wxICON(mondrian) ); new wxStaticBitmap( this, wxID_ANY, m_bitmap, wxPoint(80,20) ); - + SetFocusIgnoringChildren(); } @@ -341,7 +339,7 @@ void MyCanvas::OnEraseBackground( wxEraseEvent& event ) dc.SetPen(*wxGREEN_PEN); PrepareDC( dc ); - + // clear any junk currently displayed dc.Clear();