No changes, just simplify docview sample a bit.
Remove some unnecessary function arguments and m_frame member variable. Closes #12374. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -228,8 +228,8 @@ bool MyApp::OnInit()
|
||||
CreateMenuBarForFrame(frame, menuFile, m_menuEdit);
|
||||
|
||||
frame->SetIcon(wxICON(doc));
|
||||
frame->Centre(wxBOTH);
|
||||
frame->Show(true);
|
||||
frame->Centre();
|
||||
frame->Show();
|
||||
|
||||
SetTopWindow(frame);
|
||||
return true;
|
||||
@@ -285,10 +285,11 @@ void MyApp::CreateMenuBarForFrame(wxFrame *frame, wxMenu *file, wxMenu *edit)
|
||||
frame->SetMenuBar(menubar);
|
||||
}
|
||||
|
||||
wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
|
||||
wxFrame *MyApp::CreateChildFrame(wxView *view, bool isCanvas)
|
||||
{
|
||||
// create a child frame of appropriate class for the current mode
|
||||
wxFrame *subframe;
|
||||
wxDocument *doc = view->GetDocument();
|
||||
#if wxUSE_MDI_ARCHITECTURE
|
||||
if ( GetMode() == Mode_MDI )
|
||||
{
|
||||
@@ -317,7 +318,7 @@ wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas)
|
||||
wxSize(300, 300)
|
||||
);
|
||||
|
||||
subframe->Centre(wxBOTH);
|
||||
subframe->Centre();
|
||||
}
|
||||
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
|
Reference in New Issue
Block a user