Archived

This topic is now archived and is closed to further replies.

Xtremehobo

TreeView_GetItem not working?

Recommended Posts

Xtremehobo    820
HTREEITEM hndl;
hndl = TreeView_GetChild(GetDlgItem(g_hWnd,IDC_REORGANIZE_BEEN),parent);
TVITEM item;
			
// add this item to our list control.

item.hItem = hndl;
item.mask = TVIF_TEXT;
TreeView_GetItem(GetDlgItem(g_hWnd,IDC_REORGANIZE_BEEN),&item);
I''m trying to get the pszText member from a tree-view control. parent is an HTREEITEM that was returned from the TreeView_InsertItem that created my root item. (However, I have tried TreeView_GetRoot in place of parent and stil won''t work). This isnt working though, TreeView_GetItem is returning false. Am I not setting something in my item object that I should before I call TreeView_GetItem? Thanks

Share this post


Link to post
Share on other sites
slepyii    122
Make sure that the pszText member points to a string to hold the result. You will also need to set cchTextMax. Platform SDK docs have the details.

- Timothy S

[edited by - slepyii on August 14, 2003 8:02:03 PM]

Share this post


Link to post
Share on other sites