fixed quitting the sample; fixed memory leak of CDummyWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-30 23:05:53 +00:00
parent 885ebd2b32
commit cc3bb83d94

View File

@@ -194,6 +194,10 @@ BOOL CTheApp::InitInstance()
int CTheApp::ExitInstance()
{
#if !START_WITH_MFC_WINDOW
delete m_pMainWnd;
#endif
if ( wxTheApp )
wxTheApp->OnExit();
wxEntryCleanup();
@@ -332,6 +336,8 @@ MyChild::MyChild(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
MyChild::~MyChild()
{
if ( IsLastBeforeExit() )
PostQuitMessage(0);
}
void MyChild::OnQuit(wxCommandEvent& WXUNUSED(event))
@@ -354,7 +360,7 @@ void MyChild::OnActivate(wxActivateEvent& event)
// Dummy MFC window for specifying a valid main window to MFC, using
// a wxWidgets HWND.
CDummyWindow::CDummyWindow(HWND hWnd):CWnd()
CDummyWindow::CDummyWindow(HWND hWnd)
{
Attach(hWnd);
}