Using CTreeCtrl From A Derived Class
Posted on 2000-02-15
I've created an Explorer like application using MFC wizard. I then created a generic class which is derived from CLeftView. I can then add this code -
CTreeCtrl &pTree = GetTreeCtrl();
pTree.ModifyStyle(0, TVS_HASBUTTONS | TVS_HASLINES, SWP_SHOWWINDOW);
to a function in the new class which will compile okay but when I run it and access the function I get "Debug Assertion Failed!".
Is it possible to control a tree from any other class than CLeftView and if so how?
Thanks in advance.