Archived

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

Prozak

TreeView Control Questions

Recommended Posts

Hi, ok, i''m working in vs.net, messing arround with a tree view control. A lot of stuff is added to the control, and if you want to add something to a node, you need its handle. (duh!) Nothing new here. Now, I have a few nodes who''s name is unique, lets say "Alpha01" for example. Is there a function that searches for nodes that have a certain name, and returns their handle? This would be great because it would solve a lot of problems for me... (ex: handle = TreeView_GetByName("Alpha01"); ) Another question I would like to place: can we store any information *in* a node, like a pointer for example? Imagining I have 2 "Chair" nodes placed in diferent parts of the tree, when i click one "chair", i would like a textbox to get filled with some information, like "price: $20", and something similar (but diferent) for the other chair, and all chairs actually. So if i could store a pointer inside the node structure i could use that pointer to retrieve a data structure (very similar to "SetWindowLong", for those of you that know it)... Thanks for any tips on this

[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD]
The grass is always greener on the other server.

Share this post


Link to post
Share on other sites
oooo thanks! i''ll use that.

Other question, how do i detect that there was a right-mouse button click on any control, (right, left, double-click, whatever)?

Thanks for the info...


[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD][Yann L.][Enginuity]
Stop reading my signature and click it!

Share this post


Link to post
Share on other sites
ok, ive figured out how to work with treeviews without mfc, using simple win32 api.

I''ll write some tut when i get the chance and post it up on my website, cause the information on this is super-scatered...


[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD][Yann L.][Enginuity]
The most irrefutable evidence that there is intelligent life in the Universe is that they haven''t contacted us!

Share this post


Link to post
Share on other sites