To load controls dynamically, you need to create an "AtlAxWin" hosting window and specify the control that it should host. There are two main ways of doing this:
AtlAxWinInit();
AtlAxWinInit initializes the control hosting code.
CAxWindow wnd;
CAxWindow is a CWindow-derived wrapper for creating and manipulating "AtlAxWin" windows.
RECT rect = { 0, 0, 100, 100 };
wnd.Create(m_hWnd, rect, _T("MSCAL.Calendar"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);
The window title (the third parameter) passed to the Create function is a string identifying the control to create. This string can be a CLSID (with braces), a ProgID, a URL, or raw HTML (prefixed with MSHTML:). If either a URL or raw HTML is supplied, the Web browser will be loaded with this information.
For information on control lifetimes, see How Do I Destroy a Control?