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


CTreeCtrl::GetItemState

Returns the state of the item specified by hItem.

UINT GetItemState(
   HTREEITEM hItem,
   UINT nStateMask 
) const;

Параметры

  • hItem
    Handle of the item whose state is to be retrieved.

  • nStateMask
    Mask indicating which states are to be retrieved. For more information on possible values for nStateMask, see the discussion of the state and stateMask members of the TVITEM structure in the Windows SDK.

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

A UINT specifying the item's state. For information on possible values, see CTreeCtrl::GetItem.

Пример

// Show all of the visible items in bold.
HTREEITEM hItem = m_TreeCtrl.GetFirstVisibleItem();

while (hItem != NULL)
{
   m_TreeCtrl.SetItemState(hItem, TVIS_BOLD, TVIS_BOLD);
   ASSERT(TVIS_BOLD & m_TreeCtrl.GetItemState(hItem, TVIS_BOLD));
   hItem = m_TreeCtrl.GetNextVisibleItem(hItem);
}

Требования

Header: afxcmn.h

См. также

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

CTreeCtrl Class

CTreeCtrl Members

Hierarchy Chart

CTreeCtrl::GetItem