]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/ogl/samples/ogledit/ogledit.cpp
1. typos corrected in ftp/protocol/url (Members is no longer a hyperlink
[wxWidgets.git] / utils / ogl / samples / ogledit / ogledit.cpp
index f58c265293e66cbae496ec23697fa12cc7902ed7..87f19e6e857143d5bddb83195e3a7ffc79981860 100644 (file)
@@ -143,6 +143,7 @@ IMPLEMENT_CLASS(MyFrame, wxDocParentFrame)
 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,
@@ -174,15 +175,13 @@ void MyFrame::OnSize(wxSizeEvent& event)
   }
 }
 
-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