Drawing Onscreen
No matter how smart your Windows program is, if you can't tell the user what's going
on by putting some words or pictures onscreen, no one will know what the program has
done. A remarkable amount of the work is automatically done by your view classes (one
of the advantages of adopting the document/view paradigm), but at times you have to do
the drawing yourself. You learn about device contexts, scrolling, and more in Chapter
5, "Drawing on the Screen."
Printing on Paper
Adding printing capabilities to your program is sometimes the simplest thing in the world
because the code you use to draw onscreen can be reused to draw on paper. If more than
one page of information is involved, though, things become tricky. Chapter 6, "Printing
and Print Preview," explains all this, as well as mapping modes, headers and footers, and
more.
Persistence and File I/O
Some good things are meant to be only temporary, such as the display of a calculator or
an online chat window. However, most programs can save their documents to a file and
open and load that file to re-create a document that has been stored. MFC simplifies
this by using archives and extending the use of the stream I/O operators >> and <<. You
learn all about reading and writing to files in Chapter 7, "Persistence and File I/O."
No comments:
Post a Comment