How to get a list of the available view from the CMainFrame Class
Hi all !
Here i go again... I have an SDI application. In this application i have a docked window in wich i have a CTreeView. My docked window is derive from CControlBar. The other view of the application is a CView. Now ! what i need is when the user click on an item in the tree view some stuff is change in the other view.
|----------|----------|
| TreeView | CView |
| | |
|----------|----------|
I do not use splitter. So what i do is when the user do a selection i tell the CMainFrame what i need and i want the CMainFrame to tell the CView to redraw. But ! my problem is when i'm in my CMainFrame class and call GetActiveView i receive a pointer on the TreeView class... But i need to get a pointer on the CView class ! Also i cannot use SetActiveView() because i can't get a pointer on the class i wish to be active ! So the question is how to get a CView pointer in the CMainFrame class. Is there a way to get a list of available view ? Or is the way i'm trying totaly wrong...
Thanx all !
Charles Brenn
Re: How to get a list of the available view from the CMainFrame Class
Your may get your mainframe to know about all views, but why use GetActiveDocument() in your MainFrame which in turn loops you through your view by calling GetNextview(), but first call GetFirstViewPos() or something like that, look at document class members. Hope this helps.