We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Call to dynamically create a frame window from resource information.

virtual BOOL LoadFrame( 
   UINT nIDResource, 
   CWnd* pParentWnd = NULL, 
   CCreateContext* pContext = NULL  


The ID of shared resources associated with the frame window.


The frame's style. Include the FWS_ADDTOTITLE style if you want the title bar to automatically display the name of the document represented in the window.


A pointer to the frame's parent.


A pointer to a CCreateContext structure. This parameter can be NULL.

Construct a CFrameWnd object in two steps. First, invoke the constructor, which constructs the CFrameWnd object, and then call LoadFrame, which loads the Windows frame window and associated resources and attaches the frame window to the CFrameWnd object. The nIDResource parameter specifies the menu, the accelerator table, the icon, and the string resource of the title for the frame window.

Use the Create member function rather than LoadFrame when you want to specify all of the frame window's creation parameters.

The framework calls LoadFrame when it creates a frame window using a document template object.

The framework uses the pContext argument to specify the objects to be connected to the frame window, including any contained view objects. You can set the pContext argument to NULL when you call LoadFrame.

Header: afxwin.h