Archived

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

creator

CTreeCtrl - help!!!!!!

Recommended Posts

creator    122
Hello ladies and gentlemens and welcom to micro$oft hell! The question of the day is - how to find out if any spesific item in CTreeCtrl was clicked?... MSDN has "common controls" example, it suxx azz and i don''t really know what to do now... anyways. my code: CTreeCtrl m_tree; HTREEITEM Resourses=m_tree.InsertItem("Resourses"); HTREEITEM Snd=m_tree.InsertItem("Sounds",Resourses); HTREEITEM Anim=m_tree.InsertItem("Animations",Resourses); m_tree.InsertItem("Lead In",Snd); m_tree.InsertItem("Responce",Snd); m_tree.InsertItem("Anim List",Anim); ok, so how to find out that i clicked for example "Responce" node?... Please ppl, help, i''m completely lost.

Share this post


Link to post
Share on other sites
Shannon Barber    1681
        
//Maybe?

whenclickedon();


http://msdn.microsoft.com/library/default.asp

wtf, it changes
O n C l i c k ( ) to whenclickedon(), this some kind of joke gamedev!?

Edited by - Magmai Kai Holmlor on October 2, 2000 12:01:38 AM

Share this post


Link to post
Share on other sites
felisandria    739
2 ways:

To determine the currently selected item not at time of click:

CTreeCtrl''s GetSelectedItem()

Add TVN_SELCHANGED using class wizard (this is one of the WM_NOTIFY command set members).

You can process NM_CLICK and/or NM_DBLCLK, however, I believe these messages fire during expansion of your tree as well as during selection, therefore your results will be varied as to what the user actually did (whether or not they really selected something)

-fel

Share this post


Link to post
Share on other sites