X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f4987fed4dc52a35f0ddd649ae1cf9e75bb92d3..0dfef5a8124ac0f1bb2aed6ef5ddfa833e8e2c6e:/samples/sashtest/sashtest.cpp diff --git a/samples/sashtest/sashtest.cpp b/samples/sashtest/sashtest.cpp index a7b3dd5940..d5f42bacd4 100644 --- a/samples/sashtest/sashtest.cpp +++ b/samples/sashtest/sashtest.cpp @@ -207,7 +207,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event)) { // Make another frame, containing a canvas MyChild *subframe = new MyChild(frame, "Canvas Frame", wxPoint(10, 10), wxSize(300, 300), - wxDEFAULT_FRAME); + wxDEFAULT_FRAME_STYLE); char titleBuf[100]; sprintf(titleBuf, "Canvas Frame %d", winNumber); @@ -312,23 +312,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)) { wxLayoutAlgorithm layout; @@ -367,9 +350,3 @@ void MyChild::OnActivate(wxActivateEvent& event) canvas->SetFocus(); } -bool MyChild::OnClose(void) -{ - return TRUE; -} - -