How To Find an Item in a Tree Control Via its Label (155895)
The information in this article applies to:
- Microsoft Visual C++ 2.2
- Microsoft Visual C++ 4.0
- Microsoft Visual C++ 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q155895 SUMMARY
The "tree view" common control does not have any built-in method for
searching the entire tree, or for selecting an item contained within the
tree when given a specific item label. This article provides code that
returns the location of any item in a tree when given a specific label to
search for.
The GetItemByName() function takes the window handle of the tree control,
HTREEITEM, which points to the item in the tree to start searching and a
string for which to search.
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbcode KB155895 |
---|
|