Skip to main content
GameDev.net gamedev.net
🔒 Locked

CTreeCtrl - help!!!!!!

Started by creator Oct 2, 2000 at 7:14 PM 1 replies 350+ views
Original Post
creator
creator
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.
Bostonskii Creator2007945455198000/n.18
Shannon Barber
Shannon Barber
        
//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
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
felisandria
felisandria
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
~ The opinions stated by this individual are the opinions of this individual and not the opinions of her company, any organization she might be part of, her parrot, or anyone else. ~

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.