Partager via


CDocument::CanCloseFrame

Called by the framework before a frame window displaying the document is closed.

virtual BOOL CanCloseFrame(
   CFrameWnd* pFrame 
);

Parameters

  • pFrame
    Points to the frame window of a view attached to the document.

Return Value

Nonzero if it is safe to close the frame window; otherwise 0.

Remarks

The default implementation checks if there are other frame windows displaying the document. If the specified frame window is the last one that displays the document, the function prompts the user to save the document if it has been modified. Override this function if you want to perform special processing when a frame window is closed. This is an advanced overridable.

Requirements

Header: afxwin.h

See Also

Reference

CDocument Class

Hierarchy Chart

CDocument::SaveModified

Other Resources

CDocument Members