Collapsing a branch
Posted
by Zafir Anjum
on August 6th, 1998
// CollapseBranch - Collapses a branch completely
// hti - Handle of the tree item to collapse
void CTreeCtrlX::CollapseBranch( HTREEITEM hti)
{
if( ItemHasChildren( hti ) ){
Expand( hti, TVE_COLLAPSE );
hti = GetChildItem( hti );
do{
CollapseBranch( hti );
}while( (hti = GetNextSiblingItem( hti )) != NULL );
}
}

Comments
recursive is limited to the size of the stack ???
Posted by Legacy on 03/15/2002 12:00amOriginally posted by: D
but, The number of recursive calls is limited to the size of the stack.
Replyhow to process this problem, if I have many many item?
Loosing SelectState
Posted by Legacy on 09/14/1999 12:00amOriginally posted by: Stephan Heisen
Hi,
each time I collaps a branch the Selection Changed Message is send to the parent. How can I prevent that this happens and the items in the branch loose there selectionstate
Reply