/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
-#pragma implementation "frame.h"
+ #pragma implementation "frame.h"
#endif
#include "wx/frame.h"
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
EVT_SIZE(wxFrame::OnSize)
+ EVT_CLOSE(wxFrame::OnCloseWindow)
EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
END_EVENT_TABLE()
DoMenuUpdates();
}
+void wxFrame::OnCloseWindow( wxCloseEvent& event )
+{
+ // close the window if it wasn't vetoed by the application
+// if ( !event.GetVeto() ) // No, this isn't the interpretation of GetVeto.
+ Destroy();
+}
+
void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );