共用方式為


CWinApp::RestartInstance

Handles an application restart initiated by the restart manager.

virtual BOOL CWinApp::RestartInstance();

Return Value

TRUE if the data recovery handler opens previously open documents; FALSE if the data recovery handler has an error or if there are no previously open documents.

Remarks

When the restart manager restarts an application, the framework calls this method. This method retrieves the data recovery handler and restores the autosaved files. This method calls CDataRecoveryHandler::RestoreAutosavedDocuments to determine whether the user wants to restore the autosaved files.

This method returns FALSE if the CDataRecoveryHandler determines that there were no open documents. If there were no open documents, the application starts ordinarily.

Requirements

Header: afxwin.h

See Also

Reference

CWinApp Class

Hierarchy Chart

CDataRecoveryHandler Class