CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Location
    Geneva
    Posts
    32

    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


  2. #2
    Join Date
    Apr 1999
    Location
    France
    Posts
    35

    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
  •  





Click Here to Expand Forum to Full Width

Featured