To support ActiveX controls, you must add one line of code to two of your project’s files. Modify your main dialog’s InitInstance function (found in CONTAINER.CPP) by making a call toAfxEnableControlContainer, as in the following example:
// CContainerApp initializationBOOL CContainerApp::InitInstance()
{
AfxEnableControlContainer();
...
}Add the following to your project’s STDAFX.H header file:
#include <Afxdisp.h>