Click to See Complete Forum and Search --> : HELP: getting the pointer to the out of focus view


Michael Williams
May 18th, 1999, 07:18 PM
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);
}