if(TreeNode("SomeTree"))
{
//content inside the tree
}
TreePop();
It's much better changed to
TreeNode("SomeTree")
//content inside the tree
//don't use if condition to determine whether the controls defined here are available
TreePop();
if(!TreeNode("SomeTree"))
{
return;
}
//no need to call TreePop() if it wasn't opened
Now we need to use TreeNode like
It's much better changed to