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


CTreeCtrl::GetPrevSiblingItem

Call this function to retrieve the previous sibling of hItem.

HTREEITEM GetPrevSiblingItem(
   HTREEITEM hItem 
) const;

Параметры

  • hItem
    Handle of a tree item.

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

The handle of the previous sibling; otherwise NULL.

Пример

HTREEITEM hmyItem = m_TreeCtrl.GetSelectedItem();

// Show all of the previous siblings of hmyItem in bold.
HTREEITEM hItem = hmyItem;

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

Требования

Header: afxcmn.h

См. также

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

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::GetNextSiblingItem

CTreeCtrl::GetParentItem

CTreeCtrl::GetChildItem