Rediģēt

Kopīgot, izmantojot


Creating an MFC ActiveX Control

ActiveX control programs are modular programs designed to give a specific type of functionality to a parent application. For example, you can create a control such as a button for use in a dialog, or toolbar for use in a Web page.

Important

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

The easiest way to create an MFC ActiveX control is to use the MFC ActiveX Control Wizard.

To create an MFC ActiveX Control using the MFC ActiveX Control Wizard

  1. Follow the instructions in the help topic Creating an MFC Application but choose MFC ActiveX Control from the list of available templates.

  2. Define your application settings, control names, and control settings using the MFC ActiveX Control Wizard.

    Note

    Skip this step to keep the wizard default settings.

  3. Click Finish to close the wizard and open your new project in the development environment.

After you have created your project, you can view the files created in Solution Explorer. For more information about the files the wizard creates for your project, see the project-generated file ReadMe.txt. For more information about the file types, see File Types Created for Visual Studio C++ projects.

After you have created your project, you can use the code wizards to add functions, variables, events, properties, and methods. For more information about customizing your ActiveX control, see MFC ActiveX Controls.

See also

Adding Functionality with Code Wizards
Property Pages