Share via


Adding an ActiveX Control to a Project

OverviewHow Do I

The Gallery stores links to all ActiveX controls registered on your machine in its Registered ActiveX Controls folder. For an ActiveX control that is not registered on your machine, you must first install it, using the vendor’s installation program, before you can add it to a project. You can use ActiveX controls to add features to existing projects.

To obtain information about a registered ActiveX control, select the item, then click the More Info button.

Note   You cannot add ActiveX Controls from the Component Gallery to ATL projects without MFC support, Win32 projects, or any other projects without a .clw file.

If you need an ActiveX Control in such a project, use Insert ActiveX Control from the dialog editor's context menu to add the control to the desired dialog(s). If the dialog classes are MFC-based, the wizards will support them, but the control won't appear on the resource palette.

To add a registered ActiveX control to a project

  1. Open the project workspace to which you want to add a control.

    If you have more than one project loaded in the workspace, select the appropriate project: On the Project menu, point to Set Active Project, and click the name.

  2. On the Project menu, point to Add To Project, then click Components and Controls.

  3. In the Components and Controls Gallery dialog box (the Gallery), expand the Registered ActiveX Controls folder and select the ActiveX control you want to add to your project. Click Insert.

  4. The Confirm Classes dialog box appears. Confirm the class information using the Class Confirmation dialog.

What do you want to do?