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. problem with CTreeCtrl::GetSelectedItem()

problem with CTreeCtrl::GetSelectedItem()

Scheduled Pinned Locked Moved C / C++ / MFC
helpdata-structuresquestion
3 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.
  • V Offline
    V Offline
    Vu Nguyen
    wrote on last edited by
    #1

    Hi all! does any one ever have problems with CTreeCtrl::GetSelectedItem() function? I try to use this function to obtain the handle to the selected node in my tree. However, this function keeps returning me a null handle or wrong handle. Please advise if you have anything to say Any help is really appreciated. Thank You Vu vucsuf

    M V 2 Replies Last reply
    0
    • V Vu Nguyen

      Hi all! does any one ever have problems with CTreeCtrl::GetSelectedItem() function? I try to use this function to obtain the handle to the selected node in my tree. However, this function keeps returning me a null handle or wrong handle. Please advise if you have anything to say Any help is really appreciated. Thank You Vu vucsuf

      M Offline
      M Offline
      Mukkie
      wrote on last edited by
      #2

      Please post tree initialization and mentioned function code. Tree control could fail to create for example.

      1 Reply Last reply
      0
      • V Vu Nguyen

        Hi all! does any one ever have problems with CTreeCtrl::GetSelectedItem() function? I try to use this function to obtain the handle to the selected node in my tree. However, this function keeps returning me a null handle or wrong handle. Please advise if you have anything to say Any help is really appreciated. Thank You Vu vucsuf

        V Offline
        V Offline
        Vu Nguyen
        wrote on last edited by
        #3

        The function GetSelectedItem() is fine. The problem is how I used it. I called it in my OnClick event. This function does not work correctly with onClick event. IT does work fine with OnSelChanged event. I still don't have a good explaination on this issue. Does anyone know? Vu vucsuf

        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