Is it possible to add check to for each tree items instead of all?
-
hi Is it possible to add check to for each tree items in CTreeCtrl instead of all
EmptyBox
The check boxes in trees and list controls are done by creating an image list. The image list is applied to every item in the same manner. To get check boxes for individual items, you cannot use this feature. Instead, create your own image list for the blank (no checkbox), empty check box and filled checkboxes, and whenever you insert an item into the tree, set the appropriate image to check box or no checkbox. It does mean, though, that you will need to process NM_CLICK to 'toggle' the check state by updating the item's image accordingly.
-
The check boxes in trees and list controls are done by creating an image list. The image list is applied to every item in the same manner. To get check boxes for individual items, you cannot use this feature. Instead, create your own image list for the blank (no checkbox), empty check box and filled checkboxes, and whenever you insert an item into the tree, set the appropriate image to check box or no checkbox. It does mean, though, that you will need to process NM_CLICK to 'toggle' the check state by updating the item's image accordingly.