CTreeCtrl::GetNextSiblingItem

HTREEITEM GetNextSiblingItem( HTREEITEM hItem );

Return Value

The handle of the next sibling item; otherwise NULL.

Parameters

hItem

Handle of a tree item.

Remarks

Call this function to retrieve the next sibling of hItem.

Example

// The pointer to my tree control.
extern CTreeCtrl* pmyTreeCtrl;
// The item whose children will be displayed in bold.
extern HTREEITEM hmyItem;

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

   while (hItem != NULL)
   {
      pmyTreeCtrl->SetItemState(hItem, TVIS_BOLD, TVIS_BOLD);
      hItem = pmyTreeCtrl->GetNextSiblingItem(hItem);
   }
}

CTreeCtrl OverviewClass MembersHierarchy Chart

See Also   CTreeCtrl::GetPrevSiblingItem, CTreeCtrl::GetChildItem, CTreeCtrl::GetItem, CTreeCtrl::SelectItem, CTreeCtrl::GetParentItem