Udostępnij za pośrednictwem


CTreeCtrl::GetNextSiblingItem

Call this function to retrieve the next sibling of hItem.

HTREEITEM GetNextSiblingItem(
   HTREEITEM hItem 
) const;

Parameters

  • hItem
    Handle of a tree item.

Return Value

The handle of the next sibling item; otherwise NULL.

Example

HTREEITEM hmyItem = m_TreeCtrl.GetSelectedItem();

// Show all of the children of hmyItem in bold.
if (m_TreeCtrl.ItemHasChildren(hmyItem))
{
   HTREEITEM hItem = m_TreeCtrl.GetChildItem(hmyItem);

   while (hItem != NULL)
   {
      m_TreeCtrl.SetItemState(hItem, TVIS_BOLD, TVIS_BOLD);
      hItem = m_TreeCtrl.GetNextSiblingItem(hItem);
   }
}

Requirements

Header: afxcmn.h

See Also

Reference

CTreeCtrl Class

Hierarchy Chart

CTreeCtrl::GetPrevSiblingItem

CTreeCtrl::GetChildItem

CTreeCtrl::GetItem

CTreeCtrl::SelectItem

CTreeCtrl::GetParentItem

Other Resources

CTreeCtrl Members