Поделиться через


CTreeCtrl::GetNextSiblingItem

Call this function to retrieve the next sibling of hItem.

HTREEITEM GetNextSiblingItem(
   HTREEITEM hItem 
) const;

Параметры

  • hItem
    Handle of a tree item.

Возвращаемое значение

The handle of the next sibling item; otherwise NULL.

Пример

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);
   }
}

Требования

Header: afxcmn.h

См. также

Основные понятия

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::GetPrevSiblingItem

CTreeCtrl::GetChildItem

CTreeCtrl::GetItem

CTreeCtrl::SelectItem

CTreeCtrl::GetParentItem