Click to See Complete Forum and Search --> : I want to get the pointer to the (out of focus ) Inactive view


Michael Williams
May 14th, 1999, 11:22 AM
I want to get the pointer to the (out of focus ) Inactive view but the below code doesn't do what I want.
if pHView or pCCooView is out of focus they return whatever the guy that has the focus i.e pHView = pCCooView!


void CMainFrame::OnModeUpdate()
{

CMDIFrameWnd *pFrame = (CMDIFrameWnd*)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
CCoordinationNetView *pCCooView = (CCoordinationNetView *) pChild->GetActiveView();

if (pCCooView != NULL) // Make sure the View is there!
pCCooView->PostMessage(m_UserMsg, ML_UPDATE);

CHexView *pHView = (CHexView *) pChild->GetActiveView();

if (pHView != NULL) // Make sure the View is there!
pHView->PostMessage(m_UserMsg, ML_UPDATE);

}