CDocument::SetPathName

Call this function to specify the fully qualified path of the document's disk file.

virtual void SetPathName(
   LPCTSTR lpszPathName,
   BOOL bAddToMRU = TRUE 
);

Parameters

  • lpszPathName
    Points to the string to be used as the path for the document.

  • bAddToMRU
    Determines whether the filename is added to the most recently used (MRU) file list. If TRUE, the filename is added; if FALSE, it is not added.

Remarks

Depending on the value of bAddToMRU the path is added, or not added, to the MRU list maintained by the application. Note that some documents are not associated with a disk file. Call this function only if you are overriding the default implementation for opening and saving files used by the framework.

Requirements

Header: afxwin.h

See Also

Concepts

CDocument Class

CDocument Members

Hierarchy Chart

CDocument::GetPathName

CWinApp::AddToRecentFileList