Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

getting selected item from TreeView (win32)

87 views
Skip to first unread message

Corno

unread,
May 2, 2003, 9:34:15 AM5/2/03
to
Hi all,

If at some point I want to know which HTREEITEM is selected in a TreeView,
how do I find that out?
Is the API keeping track of that for me or do I have to handle the
TVN_SELCHANGED event and store the value for later use?

Corno


DougJones

unread,
May 2, 2003, 7:44:52 PM5/2/03
to

"Corno" <corno@%spam%.dds.nl> wrote in message
news:b8ts8a$8h$1...@reader11.wxs.nl...
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


0 new messages