void OnHandleCrash(wxCommandEvent& event);
#endif
+protected:
+
// 1st-level exception handling: we overload ProcessEvent() to be able to
// catch exceptions which occur in MyFrame methods here
virtual bool ProcessEvent(wxEvent& event);
// '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))