|
-
May 26th, 1999, 08:41 AM
#1
Pass Information from One view to another view
I have an MDI application
On one document I have a CDocument class, a CMDIChildWnd class and a CView class
In the CMDIChildWnd class I have created a Static splitter with 2 columns containing
PaneLeft : CTreeView class
PaneRight : CFormView
Now when I click on an element in my Tree, I would like this info appear in a CListBox control in my CFormView.
But when I trie, I receive an Assertion Fault.
Who can help me to passed the information from the CTreeView class to the CListBox control in my CFormView ?
Christian Niquille
Thanks for your help
-
June 1st, 1999, 10:13 AM
#2
Re: Pass Information from One view to another view
You should pass information between views using the Document.
Your TreeView should pass information to the Document.
Use the UpdateAllViews() method in the Document to pass back the information to the FormView.
UpdateAllViews takes 3 parameters :
the pointer to the view,
a Param type (maybe you can use it to pass the info)
and a CObjet passed by pointer.
You should use a CObjet object with specific methods to pass information.
That's how I would do but perhaps there're other solutions.
hope it helps
C++ developer
Faculté de Médecine
27 Bd Jean Moulin
13385 Marseille cedex 05
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|