+MyApp::~MyApp()
+{
+#if defined(__WXMSW__)
+ delete dialog1;
+ delete menu1;
+#endif
+}
+
+BEGIN_EVENT_TABLE(MyPanel, wxPanel)
+ EVT_LEFT_DOWN( MyPanel::OnClick)
+END_EVENT_TABLE()
+
+MyPanel::MyPanel( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
+ int style, const wxString &name ) :
+ wxPanel( parent, id, pos, size, style, name )
+{
+}
+
+void MyPanel::OnClick( wxMouseEvent &WXUNUSED(event2) )
+{
+ MyFrame *frame = (MyFrame*)(wxTheApp->GetTopWindow());
+ wxCommandEvent event;
+ frame->OnTestDialog( event );
+}
+
+