if (pParentFrame->GetActiveChild() == this)
{
pParentFrame->SetActiveChild((wxGenericMDIChildFrame*) NULL);
pParentFrame->SetChildMenuBar((wxGenericMDIChildFrame*) NULL);
if (pParentFrame->GetActiveChild() == this)
{
pParentFrame->SetActiveChild((wxGenericMDIChildFrame*) NULL);
pParentFrame->SetChildMenuBar((wxGenericMDIChildFrame*) NULL);