If your tree is large or has many branches, you may need to explicitly bring a given node to the user’s attention. You can do this using the SET_TREE_VISIBLE keyword to WIDGET_CONTROL:


were wTreeNode is any node attached to a tree widget. That is, any tree widget that has another tree widget as its parent widget. Setting this keyword has two possible effects:

  1. If the specified node is inside a collapsed folder, the folder and all folders above it are expanded to reveal the node.
  2. If the specified node is in a portion of the tree that is not currently visible because the tree has scrolled within the parent base widget, the tree view scrolls so that the selected node is at the top of the base widget.

Use of this keyword does not affect the tree widget selection state.