X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c5d62917d14278d8925a73d754965713e11e32f..2fd716136a961ab6038996343e42257c2d81aac2:/samples/display/display.cpp diff --git a/samples/display/display.cpp b/samples/display/display.cpp index 7ee089971d..456f75f97e 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -167,6 +167,9 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + #ifdef __WXMSW__ if ( argc == 2 && !wxStricmp(argv[1], _T("/dx")) ) { @@ -310,7 +313,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, wxBoxSizer *sizer = new wxBoxSizer(wxHORIZONTAL); sizer->Add(m_book, 1, wxEXPAND); panel->SetSizer(sizer); - sizer->Fit(this); sizer->SetSizeHints(this); }