• Advertisement

Archived

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

TreeView_GetItem not working?

This topic is 5271 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Ahh that was the problem
I was thinking that pszText was going to be a pointer to the string after I called TreeView_GetItem

THanks

Share this post


Link to post
Share on other sites

  • Advertisement