CTreeCtrl
-
Hi i was wondering if there was a way like with a list box to add an ItemDataPtr i look at the functions its got and it doesnt have this as a member function is there another way that it can be done? i have a situation where i am using lots of different classes and need to be able to retrieve them through the tree
-
Hi i was wondering if there was a way like with a list box to add an ItemDataPtr i look at the functions its got and it doesnt have this as a member function is there another way that it can be done? i have a situation where i am using lots of different classes and need to be able to retrieve them through the tree
You can use
SetItemData()
. Just cast the pointer to aDWORD
and it will work fine, unless you're compiling for 64-bit Windows (which you probably aren't :))Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
Hi i was wondering if there was a way like with a list box to add an ItemDataPtr i look at the functions its got and it doesnt have this as a member function is there another way that it can be done? i have a situation where i am using lots of different classes and need to be able to retrieve them through the tree
You can use SetItemData() to setup poiters to the objects, or indexes in polymorphyc collection that contained these classes. :) Vitali