共用方式為


CTreeCtrl::SetItemState

Sets the state of the item specified by hItem.

BOOL SetItemState( 
   HTREEITEM hItem, 
   UINT nState, 
   UINT nStateMask  
);

Parameters

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

  • nState
    Specifies new states for the item.

  • nStateMask
    Specifies which states are to be changed.

Return Value

Nonzero if successful; otherwise 0.

Remarks

For information on states, see CTreeCtrl::GetItem.

Example

See the example for CTreeCtrl::GetItemState.

Requirements

Header: afxcmn.h

See Also

Reference

CTreeCtrl Class

Hierarchy Chart

CTreeCtrl::GetItem

CTreeCtrl::GetItemState