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. doc/view ???

doc/view ???

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
3 Posts 3 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.
  • P Offline
    P Offline
    Plons
    wrote on last edited by
    #1

    Hi, I'm trying to create a little program, wich basicaly reads a file. I already have written some code in the serializing-fuction, wich reads the data. I now would like to add a progress bar and some info-text in my window (CFormView). I don't know how to get data from the doc class to the view class. Has it something to do with messages? I'm new at all of this stuff, so its very confusing... Thank's in advance!

    H D 2 Replies Last reply
    0
    • P Plons

      Hi, I'm trying to create a little program, wich basicaly reads a file. I already have written some code in the serializing-fuction, wich reads the data. I now would like to add a progress bar and some info-text in my window (CFormView). I don't know how to get data from the doc class to the view class. Has it something to do with messages? I'm new at all of this stuff, so its very confusing... Thank's in advance!

      H Offline
      H Offline
      HENDRIK R
      wrote on last edited by
      #2

      You can simply use CDocument's GetFirstViewPosition() and GetNextView() to access the desired view. An alternative for frame windos is calling AfxGetMainWnd()->GetActiveView(), which gives you access to the current view.


      We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve

      1 Reply Last reply
      0
      • P Plons

        Hi, I'm trying to create a little program, wich basicaly reads a file. I already have written some code in the serializing-fuction, wich reads the data. I now would like to add a progress bar and some info-text in my window (CFormView). I don't know how to get data from the doc class to the view class. Has it something to do with messages? I'm new at all of this stuff, so its very confusing... Thank's in advance!

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Plons wrote: I don't know how to get data from the doc class to the view class. After the document has successfully loaded the file, simply call UpdateAllViews() to notify the view that it needs to display new information. In the view's OnUpdate() method, it will ask the document (usually via GetDocument() and one other method) for the data to be displayed. Check out the Scribble tutorial on MSDN. It goes over serialization, and doc/view in great detail.


        "When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen

        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