Hi
i'm Browsing a file, then showing the
contents of file in tree control, i just want
that if user wants to browse again a file, then in
tree control previous items should be removed and new file
items shouls present only
can any1 help me, how to do that

Thanx in advance :)

Your post is a bit unclear but I think I get the basic idea.
How exactly are you storing the tree items? - Arrays, vector, struct
What file information do you actually store? - A series of char/strings

Perhaps you could flag the stored items once they are no longer of use to you. Then when the next file is read the data can be overwritten.

i am storing strings as tree items

Call DeleteItem() to remove an item from CTreeCtrl. You have to call that function for each item you want removed.

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.