Book Image

Microsoft Visual C++ Windows Applications by Example

By : Stefan Bjornander, Stefan Björnander
Book Image

Microsoft Visual C++ Windows Applications by Example

By: Stefan Bjornander, Stefan Björnander

Overview of this book

Table of Contents (15 chapters)
Microsoft Visual C++ Windows Applications by Example
Credits
About the Author
About the Reviewer
Preface
Index

Summary


  • There are small MFC classes CPoint, CSize, and CRect holding a point (x and y), a size (width and height), and a rectangle (the four corners of). These classes will be thoroughly used in the following chapters.

  • We build our own classes Color and Font based upon the Win32 API types COLORREF and LOGFONT.

  • In every application, except Tetris, we display text. In order for the user to know where to enter the next character, we need a caret (a blinking vertical bar). The class Caret handles that.

  • The classes List and Set inherit the MFC class CList to handle list and sets, respectively. The Set class supports the mathematical operations union, intersection, and difference.

  • In the application of this book, two kinds of errors may occur: internalerrors, such as an index out of bounds, or a user errors, such as entering an incorrect formula. In the former case, we use the check macro to stop the execution with an error message; in the latter case, we throw an error exception that eventually...