git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45744
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// MyMiniFrame
BEGIN_EVENT_TABLE(MyMiniFrame, wxMiniFrame)
// MyMiniFrame
BEGIN_EVENT_TABLE(MyMiniFrame, wxMiniFrame)
- EVT_CLOSE ( MyMiniFrame::OnCloseWindow)
EVT_BUTTON (ID_REPARENT, MyMiniFrame::OnReparent)
EVT_MENU (wxID_PRINT, MyMiniFrame::OnReparent)
END_EVENT_TABLE()
EVT_BUTTON (ID_REPARENT, MyMiniFrame::OnReparent)
EVT_MENU (wxID_PRINT, MyMiniFrame::OnReparent)
END_EVENT_TABLE()
-void MyMiniFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
+bool MyMiniFrame::Destroy()
{
// make it known that the miniframe is no more
mini_frame_exists = false;
{
// make it known that the miniframe is no more
mini_frame_exists = false;
+ return wxMiniFrame::Destroy();
}
void MyMiniFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
}
void MyMiniFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
// MyMainFrame
BEGIN_EVENT_TABLE(MyMainFrame, wxFrame)
// MyMainFrame
BEGIN_EVENT_TABLE(MyMainFrame, wxFrame)
- EVT_CLOSE ( MyMainFrame::OnCloseWindow)
+ EVT_MENU (wxID_EXIT, MyMainFrame::OnExit)
EVT_BUTTON (ID_REPARENT, MyMainFrame::OnReparent)
EVT_MENU (wxID_PRINT, MyMainFrame::OnReparent)
END_EVENT_TABLE()
EVT_BUTTON (ID_REPARENT, MyMainFrame::OnReparent)
EVT_MENU (wxID_PRINT, MyMainFrame::OnReparent)
END_EVENT_TABLE()
-void MyMainFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
+void MyMainFrame::OnExit(wxCommandEvent&)
}
void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
}
void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
MyMiniFrame(wxFrame *parent, wxWindowID id = wxID_ANY, const wxString& title = _T("wxToolBar Sample"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize );
MyMiniFrame(wxFrame *parent, wxWindowID id = wxID_ANY, const wxString& title = _T("wxToolBar Sample"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize );
- void OnCloseWindow(wxCloseEvent& event);
+ virtual bool Destroy();
void OnReparent(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
void OnReparent(wxCommandEvent& event);
DECLARE_EVENT_TABLE()
MyMainFrame(wxFrame *parent, wxWindowID id = wxID_ANY, const wxString& title = _T("wxToolBar Sample"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize );
MyMainFrame(wxFrame *parent, wxWindowID id = wxID_ANY, const wxString& title = _T("wxToolBar Sample"),
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize );
- void OnCloseWindow(wxCloseEvent& event);
+ void OnExit(wxCommandEvent&);
void OnReparent(wxCommandEvent& event);
void OnSetSize_150_150(wxCommandEvent &event);
void OnSetSize_200_200(wxCommandEvent &event);
void OnReparent(wxCommandEvent& event);
void OnSetSize_150_150(wxCommandEvent &event);
void OnSetSize_200_200(wxCommandEvent &event);