+void wxEmulatorFrame::OnCloseWindow(wxCloseEvent& event)
+{
+#ifdef __WXX11__
+ if (wxGetApp().m_xnestWindow)
+ {
+ wxGetApp().m_xnestWindow->SetHandle((WXWindow) NULL);
+ }
+#endif
+ this->Destroy();
+ if (wxGetApp().m_xnestPID > 0)
+ {
+ wxKill(wxGetApp().m_xnestPID);
+ wxGetApp().m_xnestPID = 0;
+ }
+}
+