From f204cf9df7db6a3f097e4d013b47d19577db09a7 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Wed, 25 Nov 2015 12:15:25 +0000 Subject: [PATCH] Implemented QuitApp(wxCloseEvent) in frmMain. --- source/frmMain.cpp | 32 +++++++++++++++++++++----------- source/frmMain.h | 1 + 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 025022e..4c37555 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -327,13 +327,34 @@ frmMainADT( parent ) } +void frmMain::QuitApp( wxCloseEvent& event ) +{ + + QuitApp(); + +} + void frmMain::QuitApp( wxCommandEvent& event ) +{ + + QuitApp(); + +} + +void frmMain::QuitApp() { //------------------------------------------------------------------- // frmMain::QuitApp: Quits the application by simply closing this // window which causes the exit as frmMain is the main window. // // wxCommandEvent Accepts a referenced event command. + //------------------------------------------------------------------- + + //------------------------------------------------------------------- + // frmMain::QuitApp: Quits the application by simply closing this + // window which causes the exit as frmMain is the main window. + // + // wxCommandEvent Accepts a referenced event command. //------------------------------------------------------------------- //Go through the windows and close each one (be it search @@ -398,17 +419,6 @@ void frmMain::QuitApp( wxCommandEvent& event ) std::exit(0); -} - -void frmMain::QuitApp() -{ - //------------------------------------------------------------------- - // frmMain::QuitApp: Quits the application by simply closing this - // window which causes the exit as frmMain is the main window. - // - // wxCommandEvent Accepts a referenced event command. - //------------------------------------------------------------------- - Close(); } diff --git a/source/frmMain.h b/source/frmMain.h index ff8ff74..497c13f 100644 --- a/source/frmMain.h +++ b/source/frmMain.h @@ -155,6 +155,7 @@ class frmMain : public frmMainADT int WindowMenuItemID = 0; protected: // Handlers for frmMainADT events. + void QuitApp( wxCloseEvent& event ); void QuitApp( wxCommandEvent& event ); void QuitApp(); void ShowAboutWindow( wxCommandEvent& event ); -- 2.39.2