X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3eeb7e105edde9063e3595d48202bdf456b73651..57bf907d8e45ced18486d74c04f41c06034b7e65:/samples/except/except.cpp diff --git a/samples/except/except.cpp b/samples/except/except.cpp index a63e63dea8..5e487845d5 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -79,7 +79,7 @@ public: // 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(); @@ -238,6 +238,9 @@ IMPLEMENT_APP(MyApp) // '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(); @@ -472,8 +475,7 @@ MyDialog::MyDialog(wxFrame *parent) 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))