Share via


Previewing the Circle Control

Before you work through the steps for creating the Circle control, you may want to try out the completed control in Test Container. This will help you understand ActiveX controls and ActiveX control containers in general, and the Circle control in particular. The CIRC3 sample is an ActiveX control that is very similar to the completed Circle control.

You'll begin by building the CIRC3 sample. An ActiveX control is built in much the same way as a typical dynamic-link library (DLL).

To build the CIRC3 version of the Circle control

  1. Open the CIRC3.DSW project file.

  2. On the Build menu, click Build Circ.ocx, or click the Build button on the Build toolbar.

After successfully building the CIRC3 control, insert it into Test Container.

To insert the CIRC3 control into Test Container

  1. On the Tools menu, click ActiveX Control Test Container.

  2. On the Test Container Edit menu, click Insert New Control.

    The Insert Control dialog box appears.

  3. In the Object Type list box, select CIRC3 Control and click OK.

    A CIRC3 control with a hashed border and resize handles is inserted into Test Container.

You can now experiment with CIRC3 to see how it works. Try any of the following:

  • Click the Test Container window outside of the control. The hashed border and resize handles disappear.

  • Click the control. The hashed border and resize handles reappear.

  • Move the control around by clicking the hashed border and dragging the control to different places in the window.

  • Change the size and shape of the control by clicking any of the resize handles and dragging the control outline to a different shape.

When you have finished, close Test Container.

By following similar steps, you can build CIRC1 and CIRC2 and insert them into Test Container.