BEGIN_EVENT_TABLE(MyFrame, wxDocParentFrame)
EVT_MENU(OGLEDIT_ABOUT, MyFrame::OnAbout)
EVT_SIZE(MyFrame::OnSize)
+ EVT_CLOSE(MyFrame::OnCloseWindow)
END_EVENT_TABLE()
MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title,
}
}
-bool MyFrame::OnClose(void)
+void MyFrame::OnCloseWindow(wxCloseEvent& event)
{
- if (wxDocParentFrame::OnClose())
+ wxDocParentFrame::OnCloseWindow(event);
+ if (!event.GetVeto())
{
wxOGLCleanUp();
- return TRUE;
}
- else
- return FALSE;
}
// Intercept menu commands