Jump to content
  • Advertisement

Archived

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

Xtremehobo

TreeView_GetItem not working?

This topic is 5453 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!