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

    2 views, 2 windows, 1 document

    I'm trying to create 2 windows (each a different view) for
    1 document. The only way I've see to do something similar
    is to use a Splitter Window. But I want the views to be in
    their own windows instead of sharing 1 frame. Could anyone
    help me find examples of this?
    Thanks.


  2. #2
    Join Date
    May 1999
    Posts
    6

    Re: 2 views, 2 windows, 1 document

    No problem. Here's a splat from the VC 5 docs. If this is what you're looking for, search on "multiple views of same document":

    Many documents require only a single view, but it is possible to support more than one view of a single document. To help you implement multiple views, a document object keeps a list of its views, provides member functions for adding and removing views, and supplies the UpdateAllViews member function for letting multiple views know when the document's data has changed.

    "Geek used to be a four-letter word. Now it's a six-figure one."

  3. #3
    Join Date
    Oct 1999
    Location
    Israel
    Posts
    6

    Re: 2 views, 2 windows, 1 document

    Hi!
    I have done something similar you need I think.
    1. You should create two different template
    (CYourDoc+CYourView1, CYourDoc+CYourView2), to get pointer_Template1,pointer_Template2.

    2. To create child window eatch with their own view:
    ((CDocTemplate*)(pointer_Template1)
    ->OpenDocumentFile(NULL);

    ((CDocTemplate*)(pointer_Template2)
    ->OpenDocumentFile(NULL);

    I you will find better desicion replay me.
    Victoria


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