Handling Text and Fonts

Circle: ActiveX Control, Lesson 7

Tip   If you prefer working from a printed tutorial, in MSDN Library Help for details about printing a lesson, a set of topics, or a single topic.

This lesson explores the text and font support provided in the ActiveX control classes. You will add three stock properties, Caption, Font, and ForeColor, to implement a caption in the Circle control. With these properties, you can use any font to draw text in the control.

Note   You can find a finished example of this lesson's code in the CIRC3 sample source code directory.

The Circle sample uses the stock Caption property to hold the text of the caption. The stock Font property holds the font that the Circle control uses to draw its caption. The resulting caption text is drawn using the color stored as the value of the ForeColor property.

In this lesson, you will:

Suggested Reading

  • , Visual C++ Programmer’s Guide

  • , Visual C++ Programmer’s Guide

  • , Visual C++ Programmer’s Guide

  • , Visual C++ Programmer’s Guide