+void MyMiniFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
+{
+ button->Reparent( main_frame );
+}
+
+// MyMainFrame
+
+BEGIN_EVENT_TABLE(MyMainFrame, wxFrame)
+ EVT_CLOSE ( MyMainFrame::OnCloseWindow)
+ EVT_BUTTON (ID_REPARENT, MyMainFrame::OnReparent)
+END_EVENT_TABLE()
+
+MyMainFrame::MyMainFrame(wxFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos,
+ const wxSize& size ) :
+ wxFrame(parent, id, title, pos, size )
+{
+}
+
+void MyMainFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
+{
+ Destroy();
+}
+
+void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
+{
+ button->Reparent( mini_frame );
+}
+
+