Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Multiple View Application

Multiple View Application

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abhishek Narula
    wrote on last edited by
    #1

    The problem given to me is to build a MFC app , which should have multiple child windows same as in a typical MDI , but all the views should be connected to single instance of Document class, Something you can give a name Multiple Views Application, that is one document and multiple views. I am not suppose to use splitters where in I can create multiple views in CFrameWnd::OnCreateClien(). Does some one has a clue about how to go about >? Abhishek Narula "Learn to appreciate others ... World would appreciate you"

    T 1 Reply Last reply
    0
    • A Abhishek Narula

      The problem given to me is to build a MFC app , which should have multiple child windows same as in a typical MDI , but all the views should be connected to single instance of Document class, Something you can give a name Multiple Views Application, that is one document and multiple views. I am not suppose to use splitters where in I can create multiple views in CFrameWnd::OnCreateClien(). Does some one has a clue about how to go about >? Abhishek Narula "Learn to appreciate others ... World would appreciate you"

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      Override CMultiDocTemplate::OpenDocumentFile. This method is called when your app opens file from disk or creates new file. Before calling original implementation, check if any document is open and close it. Tomasz Sowinski -- http://www.shooltz.com

      A 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Override CMultiDocTemplate::OpenDocumentFile. This method is called when your app opens file from disk or creates new file. Before calling original implementation, check if any document is open and close it. Tomasz Sowinski -- http://www.shooltz.com

        A Offline
        A Offline
        Abhishek Narula
        wrote on last edited by
        #3

        No you didnt get the problem , I have to have 4 views opened simultaneously , in a different windows. but all 4 view are supposed to be connected to same Doc class . Am I able to explain it now ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"

        T 1 Reply Last reply
        0
        • A Abhishek Narula

          No you didnt get the problem , I have to have 4 views opened simultaneously , in a different windows. but all 4 view are supposed to be connected to same Doc class . Am I able to explain it now ? Abhishek Narula "Learn to appreciate others ... World would appreciate you"

          T Offline
          T Offline
          Tomasz Sowinski
          wrote on last edited by
          #4

          Abhishek Narula wrote: No you didnt get the problem , I think I got it. Create MDI app. When user opens/creates new document, you have to do the following: 1) ensure that previously active document is closed. 2) open additional 3 views (or whatever number is needed) Overriden CMultiDocTemplate::OpenDocumentFile is the perfect place to put this functionality. Tomasz Sowinski -- http://www.shooltz.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups