#include "wx/defs.h"
#endif
-#if USE_DOC_VIEW_ARCHITECTURE
+#if wxUSE_DOC_VIEW_ARCHITECTURE
#ifndef WX_PRECOMP
#include "wx/wx.h"
wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
{
- m_childView = NULL;
+ m_childView = (wxView *) NULL;
}
// Extend event processing to search the view's event table
bool wxDocMDIChildFrame::ProcessEvent(wxEvent& event)
{
- if (m_childView)
- m_childView->Activate(TRUE);
-
if ( !m_childView || ! m_childView->ProcessEvent(event) )
{
// Only hand up to the parent if it's a menu command
{
wxMDIChildFrame::OnActivate(event);
- if (m_childView)
+ if (event.GetActive() && m_childView)
m_childView->Activate(event.GetActive());
}
{
m_childView->Activate(FALSE);
delete m_childView;
- m_childView = NULL;
- m_childDocument = NULL;
+ m_childView = (wxView *) NULL;
+ m_childDocument = (wxDocument *) NULL;
}
return ans;
}
#endif
- // USE_DOC_VIEW_ARCHITECTURE
+ // wxUSE_DOC_VIEW_ARCHITECTURE