Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enumerate all tree items?

Status
Not open for further replies.

tabaar

Programmer
Jun 12, 2001
34
US
Subj.

I need to get every HTREEITEM from CTreeCtrl in loop. Can You post the code how to make it?

Great thanx!
 
void EnumTreeItems(CTreeCtrl *aTree,HTREEITEM hItem)
{
HTREEITEM hItemTmp;
while(hItem != NULL){
do something about hItem;
hItemTmp = aTree->GetChildItem(hItem);
if (hItemTmp)EnumTreeItems(aTree,hItemTmp);
hItem = aTree->GetNextSiblingItem(hItem);
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top