TreeNodeCollection::TreeNodeCollection

Description

To get a collection of tree nodes from parent tree node by enumerative name prefix.

Syntax

TreeNodeCollection( TreeNode node, LPCSTR lpcsz )

Parameters

node
[input] the parent tree node
lpcsz
[input] the name prefix of the tree node

Return

Examples

EX1

void TreeNodeCollection_TreeNodeCollection_ex1()
{
    Tree tree;
    if(tree)
    {
       tree.AddNode();
       tree.AddNumericNode(1);
       tree.AddNumericNode(2);
       tree.AddNumericNode(3, "I333");
       tree.AddNumericNode(4);
       
       TreeNodeCollection tnc(tree, "int");
       foreach(TreeNode tn in tnc)
       {
           string str = tn.tagName;
           out_str(str);
       }
    }    
}

Remark

See Also

header to Include

origin.h