1. 程式人生 > >MFC中MDI程式切換子窗體

MFC中MDI程式切換子窗體

CMainFrame *pFrame = ((CMainFrame*)(GetParent()->GetParentFrame()));
pFrame->m_bIsMDIChanged = TRUE;
CChildFrame* pOldChildFrame = (CChildFrame*)pFrame->MDIGetActive();
CChildFrame* pChildFrame = pOldChildFrame;
if(pChildFrame)
{
 CString str;
 pChildFrame->GetWindowText(str);
 pFrame->MDINext();

}