CDocument::OnDocumentEvent

Called by the framework in response to a document event.

virtual void OnDocumentEvent(
   DocumentEvent deEvent
);

[in] deEvent

An enumerated data type that describes the type of event.

Document events may affect multiple classes. This method is responsible for handling document events that affect classes other than the CDocument Class. Currently, the only class that must respond to document events is the CDataRecoveryHandler Class. The CDocument class has other overrideable methods responsible for handling the effect on the CDocument.

The following table lists the possible values for deEvent and the events that they correspond to.

Value

Corresponding Event

onAfterNewDocument

A new document was created.

onAfterOpenDocument

A new document was opened.

onAfterSaveDocument

The document was saved.

onAfterCloseDocument

The document was closed.

Header: afxwin.h

Community Additions

ADD
Show: