Link to home
Start Free TrialLog in
Avatar of cira
cira

asked on

Saving the file contents in a view class

I have an MDI application where each child document is divided into three panes.One pane has a treeview, another has a listview, 3rd pane has a normal CView. All the changes I make in these are stored in a single file. How do I implement serialization for these ?
  If I create an application with Richedit view as the base class,then all these are handled automatically.Some concepts include

1. On Saving a new document only once a save dialog is flashed.On saving subsequently the dialog box is not flashed.But the contents are saved.
2. Similarly on opening a saved document and then subsequently saving it doesn't flash the save dialog box.But the contents are saved.

All these I could implement in my application by setting a flag. Is there any other alternative to this which could make it more efficient? Is serialization behind it ?

3.On closing the document it automatically asks whether to save it in a Rich edit application. How do I track it in an ordinary application as mine? This is the major glitch I face.Pls help.

thanx in advance
cira


ASKER CERTIFIED SOLUTION
Avatar of aphillips
aphillips
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cira
cira

ASKER

There is only one document class for this application.How do i associate each view's changes to the document ? Will u suggest any sample code for this implementation.

thnx in advance.
Normally when you create a view you specify a document.  How do you create your views?
Avatar of cira

ASKER

In my application I have many classes all derived from many View classes such as TreeView,ListView etc.Now i have understood the concept behind associating class data to the corresponding document.Thus enabling serialization.