There are small MFC classes
CPoint
,CSize
, andCRect
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
andFont
based upon the Win32 API typesCOLORREF
andLOGFONT
.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
andSet
inherit the MFC classCList
to handle list and sets, respectively. TheSet
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...
Microsoft Visual C++ Windows Applications by Example
By :
Microsoft Visual C++ Windows Applications by Example
By:
Overview of this book
Table of Contents (15 chapters)
Microsoft Visual C++ Windows Applications by Example
Credits
About the Author
About the Reviewer
Preface
Free Chapter
Introduction to C++
Object-Oriented Programming in C++
Windows Development
Ring: A Demonstration Example
Utility Classes
The Tetris Application
The Draw Application
The Calc Application
The Word Application
Index
Customer Reviews