• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 168
  • Last Modified:

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.


Thanks

  Want2Know
0
want2know
Asked:
want2know
1 Solution
 
abancroftCommented:
Do you want to serialise all tree nodes or jus the one you inserted?
0
 
mikeblasCommented:
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 http://www.nwlink.com/~mikeblas/samples/.  (Note that my website will someday move to http://www.mooseboy.com/ )

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
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now