次の方法で共有


Inserting the Control into a Visual C++ Application

You can insert an ActiveX control into a project from the Controls and Components Gallery or from within the Dialog editor.

To insert an ActiveX control from the Controls and Components Gallery

  1. Access the Controls and Components Gallery dialog box. See Reusing Code Topics.

  2. Select Registered ActiveX Controls.

  3. Highlight a control and click Insert.

When you insert an ActiveX control from the Controls and Components Gallery into a project, Visual C++

  • Reads the control's type library.

  • Lets you select which wrapper classes to include in the project.

  • Causes the control to appear in the Controls toolbar.

Tip   To display the Controls toolbar, right-click in an empty section of the menu bar and select Controls from the shortcut menu.

To insert an ActiveX control from the Dialog editor

  1. Right-click on a dialog box in the Dialog editor.

  2. Select Insert ActiveX Control.

  3. Select a control to insert.

ClassWizard will generate wrapper classes when, or if, you later create a member variable for the control.

Back to Using ActiveX Controls.