If we write some text in edit box which already contained in tree control in mfc when we click the button its remove from tree control .Plz tell me in visual c++ mfc plz fast replt .
THANKS IN ADVANCE

What events are called when you click on the button?

In any event Just Like if we write some text in edit box and click on button edit box search item from tree control if edit box text and tree control item matches item( node or root) then delete item from tree plz sir reply me its urgent

I understand it is urgent.
I'm trying to understand what you are saying.

Are you saying any event causes items to be removed from the tree?

This is The answer
Iterating the CTreeCtrl is done with the methods : CTreeCtrl::GetChildItem, CTreeCtrl::GetNextItem, ...

Comparing the text in the edit box and the tree item :
- CEdit::GetWindowText to get the text of the edit box.
- CTreeCtrl::GetItemText to get the text of the tree item.

Removing the item when the texts are identical:
- CTreeCtrl::DeleteItem

Tell me how we write this function step by step means how we write and where in which function plz becoz i m beginner in mfc

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.