]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/statbar/statbar.cpp
don't use deprecated toolbar API
[wxWidgets.git] / samples / statbar / statbar.cpp
index 06ad57c3b30ae3729e8fb3c2f2cb205346ddff5b..91cf5c9c90755e599ea8cdafc6e5b4d0f62f6d2f 100644 (file)
@@ -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);
 }
 
 // ----------------------------------------------------------------------------