CTreeView
-
I designed a simple SDI application with a CTreeView as a main view and i used GetTreeCtrl() to insert items to the tree view in OnInitialUpdate() function of the TreeView class like this: (GetTreeCtrl().InsertItem_T("Item A")) :sigh: So the problem is: i like to add new item to this TreeView from a Dialog when i click on Ok button but i dont know how to use GetTreeCtrl() from the Dialog .
-
I designed a simple SDI application with a CTreeView as a main view and i used GetTreeCtrl() to insert items to the tree view in OnInitialUpdate() function of the TreeView class like this: (GetTreeCtrl().InsertItem_T("Item A")) :sigh: So the problem is: i like to add new item to this TreeView from a Dialog when i click on Ok button but i dont know how to use GetTreeCtrl() from the Dialog .
You must pass a reference (or pointer) of the
CTreeView
object to your dialog. Then you will be able to do what you want. The best way to do this is to place the code to manipulate the tree on the view. When the user closes the dialog, the view changes the tree accordingly. Regards, João Paulo Figueira Embedded MVP -
You must pass a reference (or pointer) of the
CTreeView
object to your dialog. Then you will be able to do what you want. The best way to do this is to place the code to manipulate the tree on the view. When the user closes the dialog, the view changes the tree accordingly. Regards, João Paulo Figueira Embedded MVPThanks Alot Mr João Paulo Figueira, :-D Your Idea works very good :-D