Set sizer to the main frame and avoid leaking it

This commit is contained in:
Cătălin Răceanu 2019-02-26 23:21:13 +02:00
parent 595a9945b5
commit b91d2a93ee

View File

@ -170,6 +170,7 @@ MyFrame::MyFrame(const wxString& title)
wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About..."); wxButton* aboutBtn = new wxButton(this, wxID_ANY, "About...");
aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this); aboutBtn->Bind(wxEVT_BUTTON, &MyFrame::OnAbout, this);
sizer->Add(aboutBtn, wxSizerFlags().Center()); sizer->Add(aboutBtn, wxSizerFlags().Center());
SetSizer(sizer);
#endif // wxUSE_MENUS/!wxUSE_MENUS #endif // wxUSE_MENUS/!wxUSE_MENUS
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR