Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Advice and such for CTreeCtrl abstraction
Here's my scenario. I'm displaying the contents of the windows computer's directories in a CTreeCtrl. Ok, fine easy. There are certain things that I need that cannot be stored in CTreeCtrl. I need a model that holds the data externally. Enters CDirNode.
Ok, first question. Right now CDirNode is in a linked list. This list is traversed VERY often. You think there'll be a big boost in speed if I implement a binary search tree instead (based on the values of HTREEITEM member)?
Second, the only problem I can't figure out is with CTreeCtrl's check boxes. Previously I processed the NM_CLICK notification and checked to see which boxes were checked. It would REALLY be nice to have a notification just when the user checks that damn box. Is there something like that? I checked and the docs didn't say much about notifications for change of state of item, which I know are present in other controls.
0 · ·