X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8325937efa3777433f50c3556ca5b8347bc8b425..82d3ae4b8fe7132028a132ae15f734f38b09315e:/samples/docvwmdi/docview.cpp?ds=sidebyside diff --git a/samples/docvwmdi/docview.cpp b/samples/docvwmdi/docview.cpp index 51ca36d7a3..db49e8b5db 100644 --- a/samples/docvwmdi/docview.cpp +++ b/samples/docvwmdi/docview.cpp @@ -5,16 +5,12 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem +// Copyright: (c) Julian Smart // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -// #pragma implementation "docview.h" -#endif - /* - * Purpose: Document/view architecture demo for wxWindows class library - MDI + * Purpose: Document/view architecture demo for wxWidgets class library - MDI */ @@ -72,9 +68,6 @@ bool MyApp::OnInit(void) #ifdef __WXMSW__ frame->SetIcon(wxIcon(_T("doc"))); #endif -#ifdef __X__ - frame->SetIcon(wxIcon(_T("doc.xbm"))); -#endif //// Make a menubar wxMenu *file_menu = new wxMenu; @@ -99,14 +92,19 @@ bool MyApp::OnInit(void) menu_bar->Append(edit_menu, _T("&Edit")); menu_bar->Append(help_menu, _T("&Help")); +#ifdef __WXMAC__ + wxMenuBar::MacSetCommonMenuBar(menu_bar); +#endif //def __WXMAC__ //// Associate the menu bar with the frame frame->SetMenuBar(menu_bar); frame->Centre(wxBOTH); - frame->Show(TRUE); +#ifndef __WXMAC__ + frame->Show(true); +#endif //ndef __WXMAC__ SetTopWindow(frame); - return TRUE; + return true; } int MyApp::OnExit(void) @@ -124,7 +122,7 @@ wxMDIChildFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isC { //// Make a child frame wxDocMDIChildFrame *subframe = - new wxDocMDIChildFrame(doc, view, GetMainFrame(), -1, _T("Child Frame"), + new wxDocMDIChildFrame(doc, view, GetMainFrame(), wxID_ANY, _T("Child Frame"), wxPoint(10, 10), wxSize(300, 300), wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); @@ -196,7 +194,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type): - wxDocMDIParentFrame(manager, frame, -1, title, pos, size, type, _T("myFrame")) + wxDocMDIParentFrame(manager, frame, wxID_ANY, title, pos, size, type, _T("myFrame")) { editMenu = (wxMenu *) NULL; }