mnuManage->AppendSeparator();
wxMenuItem* mnuManageExit;
- mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Exit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
+ mnuManageExit = new wxMenuItem( mnuManage, wxID_EXIT, wxString( wxT("Quit") ) + wxT('\t') + wxT("Ctrl+Q"), wxEmptyString, wxITEM_NORMAL );
mnuManage->Append( mnuManageExit );
menuBar->Append( mnuManage, wxT("Manage") );
this->Layout();
this->Centre( wxBOTH );
+
+ // Connect Events
+ this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+ this->Connect( mnuManageExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
}
frmMainADT::~frmMainADT()
{
+ // Disconnect Events
+ this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( frmMainADT::QuitApp ) );
+ this->Disconnect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( frmMainADT::QuitApp ) );
+
}
frmUpdateADT::frmUpdateADT( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )