The TreeView_GetNextNode() function returns the ID of the next sibling for the specified node in a tree view field.
TreeView_GetNextNode(tree_view_field, node_ID)
• tree_view_field – The tree view field containing the specified node.
• node_ID – A long integer specifying the ID of the node whose next sibling will be returned.
A long integer containing the node ID of the next sibling of the specified node. If the specified node has no additional sibling, TV_NODEINVALID is returned.