Condividi tramite


CTreeCtrl::GetPrevVisibleItem

Call this function to retrieve the previous visible item of hItem.

HTREEITEM GetPrevVisibleItem(
   HTREEITEM hItem 
) const;

Parameters

  • hItem
    Handle of a tree item.

Return Value

The handle of the previous visible item; otherwise NULL.

Example

HTREEITEM hmyItem = m_TreeCtrl.GetSelectedItem();

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

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

Requirements

Header: afxcmn.h

See Also

Reference

CTreeCtrl Class

Hierarchy Chart

CTreeCtrl::GetNextVisibleItem

CTreeCtrl::GetFirstVisibleItem

CTreeCtrl::EnsureVisible

CTreeCtrl::GetVisibleCount

Other Resources

CTreeCtrl Members