// program startup
virtual bool OnInit();
- // 2nd-level exception handling: we get all the exceptions occuring in any
+ // 2nd-level exception handling: we get all the exceptions occurring in any
// event handler here
virtual bool OnExceptionInMainLoop();
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
+ if ( !wxApp::OnInit() )
+ return false;
+
// create the main application window
MyFrame *frame = new MyFrame();
sizerTop->Add(new wxButton(this, wxID_CANCEL, _T("&Cancel")),
0, wxCENTRE | wxALL, 5);
- SetSizer(sizerTop);
- sizerTop->Fit(this);
+ SetSizerAndFit(sizerTop);
}
void MyDialog::OnThrowInt(wxCommandEvent& WXUNUSED(event))