X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c376d80f4090ca681e91a96b6947ce299e5a950c..d80170bd4d3fa22bdd3e30f2d009f3fd8e9a8b4e:/samples/scrollsub/scrollsub.cpp diff --git a/samples/scrollsub/scrollsub.cpp b/samples/scrollsub/scrollsub.cpp index 71e4ba8b01..0799ec5aa6 100644 --- a/samples/scrollsub/scrollsub.cpp +++ b/samples/scrollsub/scrollsub.cpp @@ -174,7 +174,6 @@ MyScrolledWindow::MyScrolledWindow( wxWindow *parent, wxWindowID id, mainsizer->Add( middlesizer, 1, wxEXPAND ); - SetAutoLayout( true ); SetSizer( mainsizer ); } @@ -374,9 +373,9 @@ void MyCanvas::ScrollWindow( int dx, int dy, const wxRect *rect ) // MyFrame -const int ID_QUIT = 108; +const int ID_QUIT = wxID_EXIT; const int ID_FULL = 109; -const int ID_ABOUT = 110; +const int ID_ABOUT = wxID_ABOUT; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) @@ -421,7 +420,6 @@ MyFrame::MyFrame() topsizer->Add( m_log, 0, wxEXPAND ); #endif // wxUSE_LOG - SetAutoLayout( true ); SetSizer( topsizer ); } @@ -448,6 +446,9 @@ void MyFrame::OnAbout( wxCommandEvent &WXUNUSED(event) ) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + wxFrame *frame = new MyFrame(); frame->Show( true );