// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)
#ifndef WX_PRECOMP
+ #include "wx/log.h"
+
#include "wx/app.h"
#include "wx/frame.h"
#include "wx/dialog.h"
+ #include "wx/menu.h"
#include "wx/button.h"
#include "wx/sizer.h"
void MyFrame::OnDialog(wxCommandEvent& WXUNUSED(event))
{
- MyDialog dlg(this);
+ try
+ {
+ MyDialog dlg(this);
- dlg.ShowModal();
+ dlg.ShowModal();
+ }
+ catch ( ... )
+ {
+ Destroy();
+ throw;
+ }
}
void MyFrame::OnThrowString(wxCommandEvent& WXUNUSED(event))