Home » Category » Microsoft Visual C & C++

Microsoft Visual C & C++: Document Templates

202| Wed, 06 Feb 2008 13:37:00 GMT| gregiams| Comments (1)
I am having trouble trying to toggle between document templates from toolbar buttons or menu
items(to go between splitter windows)
Any help would be appreciated.
Thanks

Keywords & Tags: document, templates, microsoft, visual c++, vc

URL: http://www.7prog.com/visual-c-c++/95115/
 
«« Prev - Next »» 1 helpful answers below.
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 |

Microsoft Visual C & C++ Hot Answers

Microsoft Visual C & C++ New questions

Microsoft Visual C & C++ Related Categories