Partager via


CDocTemplate::OpenDocumentFile

Opens a file specified by a pathname.

virtual CDocument* OpenDocumentFile(
   LPCTSTR lpszPathName,
   BOOL bMakeVisible = TRUE 
) = 0;

Parameters

  • lpszPathName
    Pointer to the pathname of the file containing the document to be opened.

  • bMakeVisible
    Determines whether the window containing the document is to be made visible.

Return Value

A pointer to the document whose file is named by lpszPathName; NULL if unsuccessful.

Remarks

Opens the file whose pathname is specified by lpszPathName. If lpszPathName is NULL, a new file, containing a document of the type associated with this template, is created.

Requirements

Header: afxwin.h

See Also

Concepts

CDocTemplate Class

CDocTemplate Members

Hierarchy Chart

CDocTemplate::CloseAllDocuments