Share via


CDocTemplate::CreateNewFrame

virtual CFrameWnd*CreateNewFrame(CDocument*pDoc,CFrameWnd*pOther);

Return Value

A pointer to the newly created frame window, or NULL if an error occurs.

Parameters

pDoc

The document to which the new frame window should refer. Can be NULL.

pOther

The frame window on which the new frame window is to be based. Can be NULL.

Remarks

CreateNewFrame uses the CRuntimeClass objects passed to the constructor to create a new frame window with a view and document attached. If the pDoc parameter is NULL, the framework outputs a TRACE message.

The pOther parameter is used to implement the Window New command. It provides a frame window on which to model the new frame window. The new frame window is usually created invisible. Call this function to create frame windows outside the standard framework implementation of File New and File Open.

CDocTemplate OverviewClass MembersHierarchy Chart

See Also   CCreateContext, CFrameWnd::LoadFrame, CDocTemplate::InitialUpdateFrame