Testing the FlashColor Property

You have implemented FlashColor functionality, and you can test it using Test Container.

To test the FlashColor property

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

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

    The Insert Control dialog box appears.

  3. From the list box, select Circ Control.

  4. Click OK to close the Insert Control dialog box and insert the control into Test Container.

The Circle control is displayed in Test Container. Move the mouse over the circle and click once. The circle flashes red, the default value to which the FlashColor property was initialized in the CCircCtrl::DoPropExchange member function.

To change the FlashColor property

  1. On the Control menu, click Invoke Methods.

  2. From the Method Name drop-down combo box, select the PropPut version of FlashColor.

  3. The Value column in the Parameters control is blank, and the Parameter Type control shows VT_EMPTY.

  4. In the Parameter Type control, select VT_COLOR. The Parameter Value control changes to a Choose Color button.

  5. Click the Choose Color button and select black from the Color dialog box.

  6. Click OK to confirm your selection. The Value column in the Parameters control should read 00000000.

  7. Click Invoke.

  8. Click in the circle to verify that it flashes black.

Repeat the steps above, but select different colors in the Color dialog box to test the control. You will see the Value column in the Parameters control change to reflect the value of each color you select, as follows.

Color Hex Value Decimal Value
White 0x00FFFFFF 16777215
Black 0x00000000 0
Gray 0x00808080 8421504
Red 0x000000FF 255
Yellow 0x0000FFFF 65535
Green 0x0000FF00 65280
Cyan 0x00FFFF00 16776960
Blue 0x00FF0000 16711680
Magenta 0x00FF00FF 16711935

When you have finished, close Test Container.