Compartir a través de


Tree View Controls Messages

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

The following table shows the tree view controls messages, with a description of the purpose of each.

Programming element Description

TVM_CREATEDRAGIMAGE

This message creates a dragging bitmap for the specified item in a tree view control, creates an image list for the bitmap, and adds the bitmap to the image list. An application can display the image when dragging the item by using the image list functions. You can send this message explicitly or by using the TreeView_CreateDragImage macro.

TVM_DELETEITEM

This message removes an item from a tree view control. You can send this message explicitly or by using the TreeView_DeleteItem or TreeView_DeleteAllItems macro.

TVM_EDITLABEL

This message begins in-place editing of the text of the specified item, replacing the text of the item with a single-line edit control containing the text. This message implicitly selects and focuses the specified item. You can send this message explicitly or by using the TreeView_EditLabel macro.

TVM_ENDEDITLABELNOW

This message ends the editing of a label for a tree view item. You can send this message explicitly or by using the TreeView_EndEditLabelNow macro.

TVM_ENSUREVISIBLE

This message ensures that a tree view item is visible, expanding the parent item or scrolling the tree view control, if necessary. You can send this message explicitly or by using the TreeView_EnsureVisible macro.

TVM_EXPAND

This message expands or collapses the list of child items, if any, associated with the specified parent item. You can send this message explicitly or by using the TreeView_Expand macro.

TVM_GETCOUNT

This message retrieves a count of the items in a tree view control. You can send this message explicitly or by using the TreeView_GetCount macro.

TVM_GETEDITCONTROL

This message retrieves the handle of the edit control being used to edit the text of a tree view item. You can send this message explicitly or by using the TreeView_GetEditControl macro.

TVM_GETIMAGELIST

This message retrieves the handle of the normal or state image list associated with a tree view control. You can send this message explicitly or by using the TreeView_GetImageList macro.

TVM_GETINDENT

This message retrieves the amount, in pixels, that child items are indented relative to their parent items. You can send this message explicitly or by using the TreeView_GetIndent macro.

TVM_GETISEARCHSTRING

This message retrieves the incremental search string for a tree view control. The tree view control uses the incremental search string to select an item based on characters entered by the user. You can send this message explicitly or by using the TreeView_GetISearchString macro.

TVM_GETITEM

This message retrieves some or all of the attributes for a tree view item. You can send this message explicitly or by using the TreeView_GetItem macro.

TVM_GETITEMRECT

This message retrieves the bounding rectangle for a tree view item and indicates whether the item is visible. You can send this message explicitly or by using the TreeView_GetItemRect macro.

TVM_GETNEXTITEM

This message retrieves the tree view item that bears the specified relationship to a specified item. You can send this message explicitly or by using the TreeView_GetNextItem macro or one of the related macros.

TVM_GETVISIBLECOUNT

This message retrieves the number of items that can be fully visible in the client window of the tree-view control. You can send this message explicitly or by using the TreeView_GetVisibleCount macro.

TVM_HITTEST

This message determines the location of the specified point relative to the client area of a tree view control. You can send this message explicitly or by using the TreeView_HitTest macro.

TVM_INSERTITEM

This message inserts a new item in a tree view control. You can send this message explicitly or by using the TreeView_InsertItem macro.

TVM_SELECTITEM

This message selects the specified tree view item, scrolls the item into view, or redraws the item in the style used to indicate the target of a drag and drop operation. You can send this message explicitly or by using the TreeView_Select, TreeView_SelectItem, or TreeView_SelectDropTarget macro.

TVM_SETIMAGELIST

This message sets the normal or state image list for a tree view control and redraws the control using the new images. You can send this message explicitly or by using the TreeView_SetImageList macro.

TVM_SETINDENT

This message sets the width of indentation for a tree view control and redraws the control to reflect the new width. You can send this message explicitly or by using the TreeView_SetIndent macro.

TVM_SETITEM

This message sets some or all of the attributes of a tree view item. You can send this message explicitly or by using the TreeView_SetItem macro.

TVM_SETITEMSPACING

This message sets the vertical spacing between items in a tree view.

TVM_SORTCHILDREN

This message sorts the child items of the specified parent item in a tree view control. You can send this message explicitly or by using the TreeView_SortChildren macro.

TVM_SORTCHILDRENCB

This message sorts tree view items using an application-defined callback function that compares the items. You can send this message explicitly or by using the TreeView_SortChildrenCB macro.

See Also

Reference

Tree View Controls Reference