CTreeCtrl::GetItemState
Returns the state of the item specified by hItem.
UINT GetItemState(
HTREEITEM hItem,
UINT nStateMask
) const;
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 Windows SDK.
Return Value
A UINT specifying the item's state. For information on possible values, see CTreeCtrl::GetItem.
Example
// 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);
}
Requirements
Header: afxcmn.h