CTreeCtrl - Get the number of the selected item
-
Hi, I have a CTreeCtrl in an application. When I click on an item, I want to do a particuliar action. To do that, I have to know the number of the item in the tree: first, second, third an so on. How can I retreive that information ? Thanks, Claude
-
Hi, I have a CTreeCtrl in an application. When I click on an item, I want to do a particuliar action. To do that, I have to know the number of the item in the tree: first, second, third an so on. How can I retreive that information ? Thanks, Claude
Are tree controls supposed to be viewed that way. What happens to items 2..N when item 1 is expanded? Does item 2 become item 3, etc? I would opt for using
SetItemData()
for each item/node in the tree."Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
Hi, I have a CTreeCtrl in an application. When I click on an item, I want to do a particuliar action. To do that, I have to know the number of the item in the tree: first, second, third an so on. How can I retreive that information ? Thanks, Claude
Gagnon Claude wrote:
To do that, I have to know the number of the item in the tree: first, second, third an so on
Number in the tree....how are you counting? Breadth first? Depth first? And why do you need that - are you sure there's no other way of achieveing your objective?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Gagnon Claude wrote:
To do that, I have to know the number of the item in the tree: first, second, third an so on
Number in the tree....how are you counting? Breadth first? Depth first? And why do you need that - are you sure there's no other way of achieveing your objective?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
;P