Tree-View Control Item States

This section lists the item state flags used to indicate the state of an item in a tree-view control.

ConstantDescription
TVIS_BOLD

The item is bold.

TVIS_CUT

The item is selected as part of a cut-and-paste operation.

TVIS_DROPHILITED

The item is selected as a drag-and-drop target.

TVIS_EXPANDED

The item's list of child items is currently expanded; that is, the child items are visible. This value applies only to parent items.

TVIS_EXPANDEDONCE

The item's list of child items has been expanded at least once. The TVN_ITEMEXPANDING and TVN_ITEMEXPANDED notification codes are not generated for parent items that have this state set in response to a TVM_EXPAND message. Using TVE_COLLAPSE and TVE_COLLAPSERESET with TVM_EXPAND will cause this state to be reset. This value applies only to parent items.

TVIS_EXPANDPARTIAL

Version 4.70. A partially expanded tree-view item. In this state, some, but not all, of the child items are visible and the parent item's plus symbol is displayed.

TVIS_SELECTED

The item is selected. Its appearance depends on whether it has the focus. The item will be drawn using the system colors for selection.

TVIS_OVERLAYMASK

Mask for the bits used to specify the item's overlay image index.

TVIS_STATEIMAGEMASK

Mask for the bits used to specify the item's state image index.

TVIS_USERMASK

Same as TVIS_STATEIMAGEMASK.

Remarks

When you set or retrieve an item's overlay image index or state image index, you must specify the following masks in the stateMask member of the TVITEM structure:

  • TVIS_OVERLAYMASK
  • TVIS_STATEIMAGEMASK
  • TVIS_USERMASK

These values can also be used to mask off the state bits that are not of interest.

Requirements

Header

CommCtrl.h

 

 

Show: