]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/except/except.cpp
Compile fix for sound without threads. Not sure
[wxWidgets.git] / samples / except / except.cpp
index 11972994afcd36936bc3a90d74b61559f5d5134d..a7f2d7ad94c15bca0b739cfa5d66696d59bf0e39 100644 (file)
 // 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"
@@ -267,9 +270,17 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
 
 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))