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
This commit is contained in:
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user