If bSet is false, then just get the value of Change attribute; if bSet is true and lpcszOldValue is NULL will clear changed; if bSet is true and lpcszOldValue is not NULL will Set Change attribute as old value
bool tree_node_changed( TreeNode & trNode, bool bSet = false, LPCSTR lpcszOldValue = NULL )
true, if trNode is valid
EX1
void tree_node_changed_ex1() { Tree tr; TreeNode trNode1 = tr.AddTextNode("abc", "node1", 1); trNode1.SetAttribute(STR_CHANGED_ATTRIB, "Changed"); TreeNode trNode2 = tr.AddTextNode("def", "node2", 2); trNode2.SetAttribute(STR_CHANGED_ATTRIB, "Changed"); vector<string> vs = {"ccc", "def"}; int index=0; string strLabel; foreach(TreeNode trNode in tr.Children) { tree_node_changed(trNode, true, vs[index++]); trNode.GetAttribute(STR_CHANGED_ATTRIB, strLabel); out_str(strLabel); } }
origin.h