X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3fd16e6c5838ee0d2413db2745dbc74059946ce8..84fff0b395adcfecd09dd65389ba7c1c47dd7eee:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index d47b5f2ac1..7f4327481c 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -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];