kohait00 Messages: 939 Registered: July 2009 Location: Germany
Experienced Contributor
i will be warming up this thing, but need an advice in which direction to go:
the key problem in TreeCtrl is that Node is meant to be passed around by-value, i.e. performing DnD movings or using the Copy() function..
when a Node references a Ctrl which it owns, it cant be passed around by-value, it either needs to be picked (dtor would take care of destruciton of Ctrl) or a different Method for Moving/DnD of the Nodes needs to be found to avoid copy which would duplicate the Node and double ownership. so Node might need to stay unmouvable (exposed only as const or have a subclass which actually holds the ctrl..