The framework calls this method to open the named CDocument file for the application.
- [in] lpszFileName
The name of the file to be opened.
- [in] bAddToMRU
TRUE indicates the document is one of the most recent files; FALSE indicates the document is not one of the most recent files.
A pointer to a CDocument if successful; otherwise NULL.
If a document that has that name is already open, the first frame window that contains that document will get the focus. If an application supports multiple document templates, the framework uses the file name extension to find the appropriate document template to try to load the document. If successful, the document template then creates a frame window and view for the document.