แก้ไข

แชร์ผ่าน


MFC ActiveX Control Wizard

An ActiveX control is a specific type of automation server; it's 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. For more information, see MFC ActiveX Controls.

Important

ActiveX is a legacy technology that should not be used for new development. For more information about modern technologies that supersede ActiveX, see ActiveX Controls.

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, a machine part object implemented as an MFC ActiveX control might present a form-like user interface. Users could use the UI to read and edit the part number, part name, and other information. For more information, see MFC ActiveX Controls.

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're 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 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 Settings page.

See also

Visual Studio Projects - C++
C++ project types in Visual Studio
Concepts