X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6ca41e57f48db4c1a2de7ae67c7e4b655d9809af..7e84f02dfda7d5e3cf2cef1aa85169c55e8d4461:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 6409aa52f0..7f4327481c 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -55,9 +55,9 @@ bool MyApp::OnInit(void) // Create the main frame window frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(-1, -1), wxSize(500, 400), - wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); + wxDEFAULT_FRAME_STYLE | wxHSCROLL | wxVSCROLL); - // Give it an icon (this is ignored in MDI mode: uses resources) + // Give it an icon #ifdef __WXMSW__ frame->SetIcon(wxIcon("mdi_icn")); #else @@ -132,7 +132,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) { // Make another frame, containing a canvas MyChild *subframe = new MyChild(frame, "Canvas Frame", wxPoint(-1, -1), wxSize(-1, -1), - wxDEFAULT_FRAME); + wxDEFAULT_FRAME_STYLE); wxString title; title.Printf("Canvas Frame %d", winNumber); @@ -237,23 +237,6 @@ void MyCanvas::OnEvent(wxMouseEvent& event) ypos = pt.y; } -// Define the behaviour for the frame closing -// - must delete all frames except for the main one. -bool MyFrame::OnClose(void) -{ - // Must delete children - wxNode *node = my_children.First(); - while (node) - { - MyChild *child = (MyChild *)node->Data(); - wxNode *next = node->Next(); - child->OnClose(); - delete child; - node = next; - } - return TRUE; -} - void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event) ) { int w, h; @@ -295,11 +278,6 @@ void MyChild::OnActivate(wxActivateEvent& event) canvas->SetFocus(); } -bool MyChild::OnClose(void) -{ - return TRUE; -} - void MyFrame::InitToolBar(wxToolBar* toolBar) { wxBitmap* bitmaps[8];