Compartilhar via


CDocument::OnDocumentEvent

Called by the framework in response to a document event.

virtual void OnDocumentEvent(
   DocumentEvent deEvent
);

Parameters

  • [in] deEvent
    An enumerated data type that describes the type of event.

Remarks

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.

Requirements

Header: afxwin.h

See Also

Tasks

How to: Add Restart Manager Support

Reference

CDocument Class

Hierarchy Chart

CDataRecoveryHandler Class