Removed lots of OnClose functions; doc'ed OnCloseWindow better;
MM_... -> wxMM_... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
||||
void OnQuit(wxCommandEvent& event);
|
||||
void OnAbout(wxCommandEvent& event);
|
||||
void OnDelete(wxCommandEvent& event);
|
||||
bool OnClose() { return TRUE; }
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
private:
|
||||
wxTextCtrl *m_text;
|
||||
@@ -69,6 +69,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
|
||||
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
|
||||
EVT_MENU(Minimal_About, MyFrame::OnAbout)
|
||||
EVT_MENU(Minimal_Delete, MyFrame::OnDelete)
|
||||
EVT_CLOSE(MyFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -189,6 +190,11 @@ MyFrame::MyFrame()
|
||||
SetClientSize(w, h);
|
||||
}
|
||||
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
void MyFrame::OnQuit(wxCommandEvent&)
|
||||
{
|
||||
Close(TRUE);
|
||||
|
Reference in New Issue
Block a user