X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2dcd83af916c2f606a6c4bf63f9f8fdf13de1921..9298a1c2ac31868d053840359023ed24becfb42c:/samples/statbar/statbar.cpp diff --git a/samples/statbar/statbar.cpp b/samples/statbar/statbar.cpp index 06ad57c3b3..91cf5c9c90 100644 --- a/samples/statbar/statbar.cpp +++ b/samples/statbar/statbar.cpp @@ -267,6 +267,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(_T("wxStatusBar sample"), wxPoint(50, 50), wxSize(450, 340)); @@ -573,10 +576,7 @@ MyAboutDialog::MyAboutDialog(wxWindow *parent) sizerTop->Add(-1, 10, 1, wxGROW); sizerTop->Add(statbarBottom, 0, wxGROW); - SetSizer(sizerTop); - - sizerTop->Fit(this); - sizerTop->SetSizeHints(this); + SetSizerAndFit(sizerTop); } // ----------------------------------------------------------------------------