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. CTreeView Form

CTreeView Form

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • Gamil MohamadG Offline
    Gamil MohamadG Offline
    Gamil Mohamad
    wrote on last edited by
    #1

    :sigh:I Creat an SDI Application with CTreeView as a main view, How can i access and manpulate the CTreeView from a CDialog class in the same application ? M. Gamal

    U M 2 Replies Last reply
    0
    • Gamil MohamadG Gamil Mohamad

      :sigh:I Creat an SDI Application with CTreeView as a main view, How can i access and manpulate the CTreeView from a CDialog class in the same application ? M. Gamal

      U Offline
      U Offline
      User 2299399
      wrote on last edited by
      #2

      One solution : - Add a pointer to your main view in the App class - Then in the CTreeView constructor you initialize the pointer with the local this pointer. You can access the pointer member variable using "theApp" object. It is the current instance of your application and it is availabe since you include your app header (for instance "myApp.h") -You can access that pointer member everywhere provided that you include the header("myApp.h")

      1 Reply Last reply
      0
      • Gamil MohamadG Gamil Mohamad

        :sigh:I Creat an SDI Application with CTreeView as a main view, How can i access and manpulate the CTreeView from a CDialog class in the same application ? M. Gamal

        M Offline
        M Offline
        Mohammad A Gdeisat
        wrote on last edited by
        #3

        may be you need to pass the handle of the tree view window to the dialog box you create, either by sending a message or a member function call. In your dialog use the handle of the tree view to get a pointer to the tree view, and access it freely good luck, Mohammad Gdeisat And ever has it been that love knows not its own depth until the hour of separation

        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