X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45e6e6f8ab806b337dffeb3b52fec7eba3c845ef..0eb83a1a72be6e6d2a961efe892134d1008f3826:/samples/except/except.cpp diff --git a/samples/except/except.cpp b/samples/except/except.cpp index f401d6ce18..95502800c7 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -123,6 +123,8 @@ public: 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); @@ -475,8 +477,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))