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. A Question on CTreeCtrl

A Question on CTreeCtrl

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helplearning
4 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.
  • J Offline
    J Offline
    Jayanand
    wrote on last edited by
    #1

    Hi I am beginner in VC++. I have got a CTreeCtrl in my application from which I want to delete HTREEITEMs upon press of delete key. First I proceed to delete the related data structure for the HTREEITEM selected. Then I proceed to delete the HTREEITEM using the DeleteItem(HTREEITEM) method. If the HTREEITEM to be deleted is a folder with numerous sub items with in it, do i need to delete all sub items individually before deleting the parent HTREEITEM ? OR could i directly delete the parent HTREEITEM ? Please help me out on this. Thank You, Jayanand.

    N 2 Replies Last reply
    0
    • J Jayanand

      Hi I am beginner in VC++. I have got a CTreeCtrl in my application from which I want to delete HTREEITEMs upon press of delete key. First I proceed to delete the related data structure for the HTREEITEM selected. Then I proceed to delete the HTREEITEM using the DeleteItem(HTREEITEM) method. If the HTREEITEM to be deleted is a folder with numerous sub items with in it, do i need to delete all sub items individually before deleting the parent HTREEITEM ? OR could i directly delete the parent HTREEITEM ? Please help me out on this. Thank You, Jayanand.

      N Offline
      N Offline
      Nick Blumhardt
      wrote on last edited by
      #2

      Hi :) You can handle the TCN_DELETEITEM message that the tree control will send whenever an item is deleted ... this will happen for each child item after you delete a parent item manually. sorry this answer is a bit brief. Nick

      1 Reply Last reply
      0
      • J Jayanand

        Hi I am beginner in VC++. I have got a CTreeCtrl in my application from which I want to delete HTREEITEMs upon press of delete key. First I proceed to delete the related data structure for the HTREEITEM selected. Then I proceed to delete the HTREEITEM using the DeleteItem(HTREEITEM) method. If the HTREEITEM to be deleted is a folder with numerous sub items with in it, do i need to delete all sub items individually before deleting the parent HTREEITEM ? OR could i directly delete the parent HTREEITEM ? Please help me out on this. Thank You, Jayanand.

        N Offline
        N Offline
        Nick Blumhardt
        wrote on last edited by
        #3

        Hi :) You can handle the TCN_DELETEITEM message that the tree control will send whenever an item is deleted ... this will happen for each child item after you delete a parent item manually. You can delete the data for a child item when this message is sent. sorry this answer is a bit brief. Nick

        J 1 Reply Last reply
        0
        • N Nick Blumhardt

          Hi :) You can handle the TCN_DELETEITEM message that the tree control will send whenever an item is deleted ... this will happen for each child item after you delete a parent item manually. You can delete the data for a child item when this message is sent. sorry this answer is a bit brief. Nick

          J Offline
          J Offline
          Jayanand
          wrote on last edited by
          #4

          Hi Nick, Thank U very much for the reply. Ur mail was brief but informative. Thanks, Jayanand.

          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