-
Book Overview & Buying
-
Table Of Contents
Microsoft Visual C++ Windows Applications by Example
By :
In the application of the following chapters, we will need some general container classes. MFC has many classes for developing graphical interfaces. It also has some general container classes for list and arrays. However, in some cases, a better solution is to build our own classes.
It shall also be mentioned that the Standard Template Library (STL) is a part of standard C++. It holds several generic container classes such as pairs, lists, and vectors. However, I found many of those classes to be rather clumsy to use, I have also found that it is not a good idea to mix MFC and STL container classes. Therefore, in this chapter we use the MFC classes useful to us, and write our own ones when necessary.
We look at the MFC classes CPoint, CSize, and CRect. They hold a point, size, and rectangle, respectively, and they will come in handy in the following chapters.
There is a structure LOGFONT, representing a font. However, we build the class Font to encapsulate it. In...
Change the font size
Change margin width
Change background colour