Export (0) Print
Expand All
Expand Minimize

CMDIFrameWndEx::CreateDocumentWindow

Creates a child document window.

virtual CMDIChildWndEx* CreateDocumentWindow( 
   LPCTSTR lpcszDocName, 
   CObject* pObj 
);

[in] lpcszDocName

A text string that contains a document identifier. Typically, it is the full path of a document file.

[in] pObj

A pointer to a user-defined object. For example, a developer can create an application-specific data structure describing the document and telling how the document should be initialized at startup.

A pointer to CMDIChildWndEx.

The framework calls this method when it loads the list of documents previously saved in the registry.

Override this method in order to create documents when they are being loaded from the registry.

The following example shows how CreateDocumentWindow is used in the VisualStudioDemo Sample: MFC Visual Studio Application.

In this example, g_strStartViewName could be the name of a "virtual document" (for example, "Start Page") that is not actually loaded from a disk file. Therefore we need special processing to handle that case.

CMainFrame::CMainFrame()
{
	CMFCPopupMenu::SetForceShadow(TRUE);

	m_bCanConvertControlBarToMDIChild = TRUE;
}

Header: afxMDIFrameWndEx.h

Show:
© 2014 Microsoft