Share via


Tree Control Item Information

OverviewSample

Tree controls () have a number of member functions that retrieve information about items in the control. The member function retrieves some or all of the data associated with an item. This data could include the item's text, state, images, count of child items, and an application-defined 32-bit data value. There is also a function that can set some or all of the data associated with an item.

The , , , and member functions retrieve individual attributes of an item. Each of these functions has a corresponding Set function for setting the attributes of an item.

The member function retrieves the tree control item that bears the specified relationship to the current item. This function can retrieve an item's parent, the next or previous visible item, the first child item, and so on. There are also member functions to traverse the tree: , , , , , , , , , and .

The member function retrieves the bounding rectangle for a tree control item. The and member functions retrieve a count of the items in a tree control and a count of the items that are currently visible in the tree control's window, respectively. You can ensure that a particular item is visible by calling the member function.

See Also   Windows Common Controls and MFC Classes