共用方式為


Overview: Creating an ActiveX Control Container

OverviewDetails

An ActiveX Control Container is a parent program that supplies the environment for an ActiveX (formerly OLE) control to run. You can create an application capable of containing ActiveX controls with or without MFC, but it is much easier to do so with MFC.

Creating an MFC container program using the MFC AppWizard allows you to access the many features of ActiveX controls and Automation that are implemented by the MFC and ActiveX classes. These features include visual editing, Automation, creating compound files, and support for controls. The MFC AppWizard visual editing options that your parent program will support include creating a container, a mini-server, a full-server, and a program that is both a container and a server.

There are three types of applications you can create an ActiveX container for:

  • New MFC Application. To create a new MFC program that includes Automation, visual editing, compound files, and/or control support, use the MFC AppWizard (EXE version) and in Step 3 choose the appropriate Automation options.

  • Existing MFC Application. If you are adding control containment to an existing MFC application, see OLE Control Containers: Manually Enabling OLE Control Containment.

  • Non-MFC Application. If you are adding control containment to a non-MFC application, see Control Containers in Chapter 19 of Adam Denning's book OLE Controls Inside Out (Microsoft Press 1995).

What do you want to know more about?