Prepare Your MFC ActiveX Control Program for Use
To prepare an MFC ActiveX Control program for use
Compile and link the ActiveX (formerly OLE) Control starter files.
Note The build process automatically registers an ActiveX control in the registry. But you can use the following procedure to manually register an ActiveX control in the registry if needed.
To manually register an MFC ActiveX Control
- On the Tools menu, click Register Control.
Registering a control adds the following information to the Registration Database:
The text name of the control
The class name of the control
An indicator stating that the control conforms to the MFC ActiveX control protocols
The path of the control’s executable
The path and resource ID of the control palette bitmap
An indication of whether the control is insertable
The IDispatch IDs of the control’s properties and events interfaces
Controls built with the MFC ActiveX control classes are self-registering because two entry points in the control’s executable, DLLRegisterServer and DLLUnregisterServer, are automatically added when ControlWizard creates the control’s files. As their names imply, DLLRegisterServer and DLLUnregisterServer respectively add and remove the control’s registration information in the registry.