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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting a pointer to the view object

Getting a pointer to the view object

Scheduled Pinned Locked Moved C / C++ / MFC
comtutorialquestion
5 Posts 4 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.
  • C Offline
    C Offline
    Cam
    wrote on last edited by
    #1

    Can someone tell me if there is a function to get a pointer to the view object? For example, you can get one to the document object like so: CMyAppDoc *pDoc = GetDocument(); Why can't there be a bloody 'GetView()' function?? ~Cam Desautels (BinaryUprising.com)

    R E 2 Replies Last reply
    0
    • C Cam

      Can someone tell me if there is a function to get a pointer to the view object? For example, you can get one to the document object like so: CMyAppDoc *pDoc = GetDocument(); Why can't there be a bloody 'GetView()' function?? ~Cam Desautels (BinaryUprising.com)

      R Offline
      R Offline
      Rick York
      wrote on last edited by
      #2

      There are several ways to do this. From what level do you want to get it (app, doc, mainframe, etc.) ?

      C 1 Reply Last reply
      0
      • R Rick York

        There are several ways to do this. From what level do you want to get it (app, doc, mainframe, etc.) ?

        C Offline
        C Offline
        Cam
        wrote on last edited by
        #3

        I guess from the doc level. ~Cam Desautels (BinaryUprising.com)

        RaviBeeR 1 Reply Last reply
        0
        • C Cam

          I guess from the doc level. ~Cam Desautels (BinaryUprising.com)

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #4

          See CDocument::GetFirstViewPosition() and CDocument::GetNextView(). /ravi "There is always one more bug..." http://www.ravib.com ravib@ravib.com

          1 Reply Last reply
          0
          • C Cam

            Can someone tell me if there is a function to get a pointer to the view object? For example, you can get one to the document object like so: CMyAppDoc *pDoc = GetDocument(); Why can't there be a bloody 'GetView()' function?? ~Cam Desautels (BinaryUprising.com)

            E Offline
            E Offline
            Eugene Pustovoyt
            wrote on last edited by
            #5

            Hello, This question is in detail considered in article Q108587 HOWTO: Get Current CDocument or CView from Anywhere Microsoft Knowledge Base! Best regards, Eugene Pustovoyt :-D Sonork ID 100.10002:Yaumen

            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