Serializing the Tree control

Hi listers

 I have a tree control in the Dialog bar. what I want is to get the control of the tree and insert an item dynamically and serialize it.
The dialog bar is resizable and so the tree control.

So suggest me an answer if possible a little bit of code so that it will help me out.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you want to serialise all tree nodes or jus the one you inserted?
Obviously, to serialize a tree control's content you'll need to write some code that recurses the items in the control.

Serializing the control from a flat file isn't so easy, but becomes trivial if you remember to write notes about the recursion path you took as the file was written.

I've created such a sample which uses a CTreeView and lets you load and save its content. See the TREESTORE.ZIP sample out at  (Note that my website will someday move to )

This is a pretty involved problem. Plus, I wrote a very complete sample for your reference and reuse. It seems like you should offer more than 30 points for such an effort.

..B ekiM

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.