Udostępnij za pośrednictwem


MFC ActiveX Control Wizard

An ActiveX control is a specific type of automation server; it is a reusable component. The application hosting the ActiveX control is the automation client of that control. If your goal is to create such a reusable component, then use this wizard to create your control. See MFC ActiveX Controls for more information.

Alternately, you can create an automation server MFC application using the MFC Application Wizard.

An ActiveX control created with this wizard can have a user interface, or it can be invisible. You can indicate this option in the Control Settings page in the wizard. A timer control is an example of an ActiveX control that you would want to be invisible.

ActiveX controls can have a complex user interface. Some controls might be like encapsulated forms: a single control containing many fields, each a Windows control in its own right. For example, an auto parts object implemented as an MFC ActiveX control might present a form-like user interface through which users could read and edit the part number, part name, and other information. See MFC ActiveX Controls for more information.

If you need to create a container for your ActiveX objects, see Create an ActiveX Control Container.

The MFC starter program includes C++ source (.cpp) files, resource (.rc) files, and a project (.vcxproj) file. The code generated in these starter files is based on MFC.

The following sample list shows tasks and types of enhancements for your ActiveX control:

Overview

This wizard page describes the current application settings for the MFC ActiveX control project you are creating. By default, the wizard creates a project as follows:

  • The default project generates no run-time license or help files. You can change these default settings on the Application Settings page. Only the selections you make on this page of the ActiveX Control Wizard are reflected on the Overview page.

  • The project includes a control class and a property page class, based on the name of the project. You can edit the names of your project and file names on the Control Names page.

  • The control is based on no existing Windows control, activates when it becomes visible, has a user interface, and includes an About dialog box. You can change these default settings on the Control Settings page.

See Also

Concepts

Visual C++ Project Types

Other Resources

Creating and Managing Visual C++ Projects

ATL Concepts