X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3dd4e4e05cc46ffc653730715e527af7b18b9caf..84fff0b395adcfecd09dd65389ba7c1c47dd7eee:/samples/mdi/mdi.cpp diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 4dbb0c058b..7f4327481c 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -55,7 +55,7 @@ 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 #ifdef __WXMSW__ @@ -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];