CTreeCtrl::GetItemState

UINT GetItemState( HTREEITEM hItem, UINT nStateMask ) const;

Return Value

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

Parameters

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 Platform SDK.

Remarks

Returns the state of the item specified by hItem.

Example

// The pointer to my tree control.
extern CTreeCtrl* pmyTreeCtrl;

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

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

CTreeCtrl OverviewClass MembersHierarchy Chart

See Also   CTreeCtrl::GetItem