Jump to content
  • Advertisement

Archived

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

creator

CTreeCtrl - help!!!!!!

This topic is 6500 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

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
Advertisement
        
//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
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

  • 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!