Share via


MFC Controls Samples

The topics in this section are the abstracts for the MFC ActiveX controls samples. For a list of all MFC samples, see MFC Samples.

An ActiveX control (formerly OLE control) is an ActiveX object with an extended interface that lets it behave like a control for Microsoft Windows.

ActiveX Controls

Adding ActiveX Controls to the Toolbox

To place ActiveX controls or objects in the Toolbox window, see Customize Toolbox Dialog Box. Once inserted, the ActiveX controls can be dragged to the dialog box that you are constructing.

Tip

To quickly add registered ActiveX controls to a dialog box template, see Viewing and Adding ActiveX Controls to a Dialog Box.

Manual Registration of ActiveX Controls

For the following procedure to work, the ActiveX development tools must be installed and the development environment must be open.

  1. Open the ActiveX Control Test Container. See Testing Properties and Events with Test Container for information on how to access Test Container.

  2. On the File menu, click Register Controls.

    The Register Controls dialog box appears.

  3. Click Register and browse to the directory in which the ActiveX control is installed.

  4. In the File name list, double-click the file of the control. Test Container will register the control and add it to the list under Registered Controls in the Register Controls dialog box.

  5. Click Close to close the Register Controls dialog box. You can now insert your control in Test Container or in any dialog box or form you want.

Testing Controls in Test Container

The ActiveX Control Test Container is a tool for testing and debugging ActiveX controls. You can use it to test a control's functionality by changing the control's properties, invoking its methods, and firing its events. See Testing Properties and Events with Test Container for information on using Test Container.

See Also

Other Resources

MFC Samples