When you click the menu / toolbar item you have to set the certain window in the splitter as active. Therefore you simply have to find a right way to find the necessary view in your document. For example you can use the method like this:
POSITION pos;
pos = GetFirstViewPosition();
while (pos)
{
CView* pView = GetNextView(pos);
if (pView->IsKindOf(RUNTIME_CLASS(CViewXXX))) // here is you view class
CFrameWnd * pFrame = pView->GetParentFrame();
pFrame->SetActiveView(pView);
}
hbb
| Sat, 10 Nov 2007 05:31:00 GMT |