Compartilhar via


CDataRecoveryHandler::CreateDocumentInfo

Adds a document to the list of open documents.

virtual BOOL CreateDocumentInfo(
   CDocument *pDocument
);

Parameters

Parameter

Description

[in] pDocument

A pointer to a CDocument. This method creates the document information for this CDocument.

Return Value

The default implementation returns TRUE.

Remarks

This method checks if pDocument is already in the list of documents before it adds the document. If pDocument is already in the list, this method deletes the autosaved file associated with pDocument.

To use this method, either AFX_RESTART_MANAGER_AUTOSAVE_AT_RESTART or AFX_RESTARTMANAGER_AUTOSAVE_AT_INTERVAL must be set in m_dwRestartManagerSupportFlags. See CDataRecoveryHandler Class for more information about the m_dwRestartManagerSupportFlags parameter.

Requirements

Header: afxdatarecovery.h

See Also

Reference

CDataRecoveryHandler Class

Hierarchy Chart

CDocument Class

CDataRecoveryHandler::UpdateDocumentInfo

CDataRecoveryHandler::RemoveDocumentInfo