因为多文挡对应了多个文挡,可能就有多个视图,所以你应该:
看看MSDN:
This function returns NULL when called for an MDI main frame window (CMDIFrameWnd). In an MDI application, the MDI main frame window does not have a view associated with it. Instead, each individual child window (CMDIChildWnd) has one or more associated views. The active view in an MDI application can be obtained by first finding the active MDI child window and then finding the active view for that child window. The active MDI child window can be found by calling the function MDIGetActive or GetActiveFrame as demonstrated in the following:CMDIFrameWnd *pFrame = 
             (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;// Get the active MDI child window.
CMDIChildWnd *pChild = 
             (CMDIChildWnd *) pFrame->GetActiveFrame();// or CMDIChildWnd *pChild = pFrame->MDIGetActive();// Get the active view attached to the active MDI child
// window.