From 06b3e19fcb73728b9d967c3a4a997a01a23aacfe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 12 Oct 2011 00:35:04 +0000 Subject: [PATCH] Make it possible to close "shaped" sample from the menu. The sample didn't define any handler for wxID_EXIT menu item, do add it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/shaped/shaped.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/samples/shaped/shaped.cpp b/samples/shaped/shaped.cpp index 6e9a0d955c..6f7ea9fb76 100644 --- a/samples/shaped/shaped.cpp +++ b/samples/shaped/shaped.cpp @@ -91,6 +91,7 @@ private: void OnShowShaped(wxCommandEvent& event); void OnShowTransparent(wxCommandEvent& event); void OnShowEffect(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); DECLARE_EVENT_TABLE() }; @@ -244,6 +245,7 @@ BEGIN_EVENT_TABLE(MainFrame, wxFrame) EVT_MENU(Show_Shaped, MainFrame::OnShowShaped) EVT_MENU(Show_Transparent, MainFrame::OnShowTransparent) EVT_MENU_RANGE(Show_Effect_First, Show_Effect_Last, MainFrame::OnShowEffect) + EVT_MENU(wxID_EXIT, MainFrame::OnExit) END_EVENT_TABLE() MainFrame::MainFrame() @@ -350,6 +352,11 @@ void MainFrame::OnShowEffect(wxCommandEvent& event) new EffectFrame(this, eff, 1000); } +void MainFrame::OnExit(wxCommandEvent& WXUNUSED(event)) +{ + Close(); +} + // ---------------------------------------------------------------------------- // shaped frame // ---------------------------------------------------------------------------- -- 2.45.2