共用方式為


CDocument::SaveModified

Called by the framework before a modified document is to be closed.

virtual BOOL SaveModified( );

Return Value

Nonzero if it is safe to continue and close the document; 0 if the document should not be closed.

Remarks

The default implementation of this function displays a message box asking the user whether to save the changes to the document, if any have been made. Override this function if your program requires a different prompting procedure. This is an advanced overridable.

Requirements

Header: afxwin.h

See Also

Reference

CDocument Class

Hierarchy Chart

CDocument::CanCloseFrame

CDocument::IsModified

CDocument::OnNewDocument

CDocument::OnOpenDocument

CDocument::OnSaveDocument