TreeView_GetSelection

The TreeView_GetSelection macro retrieves the currently selected item in a tree-view control. You can use this macro, or you can explicitly send the TVM_GETNEXTITEM message with the TVGN_CARET flag.

HTREEITEM TreeView_GetSelection(

hwnd  
);  

Parameters

hwnd

Handle to the tree-view control.

Return Values

Returns the handle to the item if successful or NULL otherwise.

See Also

TreeView_GetNextItem, TVM_GETNEXTITEM