Freigeben über


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.

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 a Project with a Visual C++ Application Wizard.

  2. In the New Project dialog box, select the MFC ActiveX Control icon in the Templates pane to open the MFC ActiveX Control Wizard.

  3. 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.

  4. 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 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

Reference

Property Pages (Visual C++)

Concepts

Adding Functionality with Code Wizards

Other Resources

Deploying Applications