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. Index of a tree item in a tree control

Index of a tree item in a tree control

Scheduled Pinned Locked Moved C / C++ / MFC
databasedata-structureshelptutorialquestion
4 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.
  • M Offline
    M Offline
    mosali satish
    wrote on last edited by
    #1

    hi everyone, iam working with tree control and i have small problem with it.i want find the index of the item in a tree control.how to find the index.i have gone through the member funtions of the CTreeCtrl class but i couldn't find any method which helps me? So guys please give me solution for my problem. with regards M.Satish Reddy.

    sathish

    W R H 3 Replies Last reply
    0
    • M mosali satish

      hi everyone, iam working with tree control and i have small problem with it.i want find the index of the item in a tree control.how to find the index.i have gone through the member funtions of the CTreeCtrl class but i couldn't find any method which helps me? So guys please give me solution for my problem. with regards M.Satish Reddy.

      sathish

      W Offline
      W Offline
      Weiye Chen
      wrote on last edited by
      #2

      CTreeCtrl is different from those listboxes or list controls. It doesn't have an index. Instead you get handle to a particular item and using that, you can get its child item and so on.

      1 Reply Last reply
      0
      • M mosali satish

        hi everyone, iam working with tree control and i have small problem with it.i want find the index of the item in a tree control.how to find the index.i have gone through the member funtions of the CTreeCtrl class but i couldn't find any method which helps me? So guys please give me solution for my problem. with regards M.Satish Reddy.

        sathish

        R Offline
        R Offline
        Rage
        wrote on last edited by
        #3

        To complete Mr Chen's post, you can emulate an indexing of items using the Data member of the items in the TreeCtrl. It is accessible using SetItemData and GetItemData

        ~RaGE();

        I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus

        1 Reply Last reply
        0
        • M mosali satish

          hi everyone, iam working with tree control and i have small problem with it.i want find the index of the item in a tree control.how to find the index.i have gone through the member funtions of the CTreeCtrl class but i couldn't find any method which helps me? So guys please give me solution for my problem. with regards M.Satish Reddy.

          sathish

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          See GetSelectedItem

          _**


          **_

          WhiteSky


          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