X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7db4235153427376bb69f90aaf82030ff273963..f4f5d5697dc5e34a5582061dbd857d1cd4326f91:/samples/minifram/minifram.cpp?ds=sidebyside diff --git a/samples/minifram/minifram.cpp b/samples/minifram/minifram.cpp index e63bf430e0..4b01ac159f 100644 --- a/samples/minifram/minifram.cpp +++ b/samples/minifram/minifram.cpp @@ -57,13 +57,13 @@ wxButton *button = (wxButton*) NULL; // main frame bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // Create the main frame window main_frame = new MyMainFrame((wxFrame *) NULL, wxID_ANY, _T("wxFrame sample"), wxPoint(100, 100), wxSize(300, 200)); - // main_frame->SetMinSize( wxSize(100,100) ); - // main_frame->SetMaxSize( wxSize(400,400) ); - // same as main_frame->SetSizeHints( 100,100, 400,400 ); wxMenu *file_menu = new wxMenu; @@ -238,10 +238,10 @@ void MyMainFrame::OnSetSize_200_200(wxCommandEvent& WXUNUSED(event)) void MyMainFrame::OnSetMaxSize_150_150(wxCommandEvent& WXUNUSED(event)) { - SetMaxSize( wxSize(150,150) ); + SetSizeHints( -1, -1, 150, 150 ); } void MyMainFrame::OnSetMaxSize_300_300(wxCommandEvent& WXUNUSED(event)) { - SetMaxSize( wxSize(300,300) ); + SetSizeHints( -1, -1, 300, 300 ); }