Announcement

Collapse
No announcement yet.

TVM_DELETEITEM - deletes children or updates .cchildren of parent

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TVM_DELETEITEM - deletes children or updates .cchildren of parent

    The MSDN docs are not very clear on what happens when deleting a node that isn't the root. Does this delete all children and/or update the .cchildren count of the parent node?
    Bernard Ertl
    InterPlan Systems

  • #2
    TVM_DELETEITEM deletes the node and all its children.

    There is no such thing as a 'cChildren' variable. When you request a child count in TVITEM using TVM_GETITEM, you will get the current child count.

    MCM
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]ems.com
    http://www.talsystems.com

    Comment


    • #3
      Thanks Michael. It was my understanding that the TVITEM.cChildren value for a node could be manipulated to force the display of the + button even when no children had been inserted into the TreeView, so I wasn't sure if the TreeView control was really updating/maintaining this or if it was on the user to maintain it.
      Bernard Ertl
      InterPlan Systems

      Comment


      • #4
        You may need to force a redraw after deleting the last child of a particular node to get the display to show 'current condition' but that's hardly front-page news.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Good thing there are discussion forums where people who don't read the news can ask questions from those who do.
          Bernard Ertl
          InterPlan Systems

          Comment

          Working...
          X