HTREEITEM lifetime
-
Basically, when you insert an item into a tree, you do something along the lines of HTREEITEM hMyItem = pMyTree->InsertItem(&lvTreeItem); Is it ever possible that the value of hMyItem will change throughout the lifetime of the tree? My reason for asking is that I have an object for each item in the tree, and I would like to maintain the handle within the object so that changes to it can be reflected easily in the tree (i.e. by changing the icon etc) Thanks in advance!
-
Basically, when you insert an item into a tree, you do something along the lines of HTREEITEM hMyItem = pMyTree->InsertItem(&lvTreeItem); Is it ever possible that the value of hMyItem will change throughout the lifetime of the tree? My reason for asking is that I have an object for each item in the tree, and I would like to maintain the handle within the object so that changes to it can be reflected easily in the tree (i.e. by changing the icon etc) Thanks in advance!
Martyn Pearson wrote: Is it ever possible that the value of hMyItem will change throughout the lifetime of the tree? As far as I know a handle to a tree item should be valid during whole lifetime of the tree. I can't guess any situation in which the handle could be changed - especially as you can use it on any time for further operations like deleting, ...
-
Basically, when you insert an item into a tree, you do something along the lines of HTREEITEM hMyItem = pMyTree->InsertItem(&lvTreeItem); Is it ever possible that the value of hMyItem will change throughout the lifetime of the tree? My reason for asking is that I have an object for each item in the tree, and I would like to maintain the handle within the object so that changes to it can be reflected easily in the tree (i.e. by changing the icon etc) Thanks in advance!
Martyn Pearson wrote: Is it ever possible that the value of hMyItem will change throughout the lifetime of the tree? No, if that happened then
HTREEITEM
s would be useless. --Mike-- Looks like I picked the wrong week to stop sniffing glue. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm