Hi there,

i have the followin portion of code which works fine for me,

but there is 1 question left.

first let´s look at the code

CView::AnyFunction

{

CFile file;

CFileException fe;

file.Open(m_strFileName, CFile::modeCreate|CFile::modeWrite, &fe);

CArchive ar(&file, CArchive::store);

ar.m_pDocument = GetDocument();

SerializeRaw(ar);

}

As i noticed, the code works, the file in my edit ctrl is stored.

The question is: Do I have to have a call to file.Close() and if yes where?

I tried to Clode the handle after 'SerializeRaw(ar)' but this cuases a crash

because the Write - File function seems to be called later.

Can anybody tell me a couple of things on this?!?


thanks very much