Get a tree node and check if it is already present by label attribute, if not, create it first
TreeNode tree_check_get_node_by_label(TreeNode& tr, LPCSTR lpcszLabel, BOOL bCaseSensitive = FALSE)
found TreeNode, or returns created TreeNode if not found
EX1
void tree_check_get_node_by_label_ex1() { Tree tr; tr.abc.SetAttribute(STR_LABEL_ATTRIB, "this is a test"); tr.def.nVal = 1; TreeNode trNode = tree_check_get_node_by_label(tr, "this is a test"); // should return abc treenode if( trNode) out_str(trNode.tagName); // shoule output "abc" }
tree_get_node, tree_get_node_by_dataid
origin.h