Chapter Seventeen -- Reading and Writing Documents -- SDI Applications

Chapter Seventeen

As you've probably noticed, every AppWizard-generated program has a File menu that contains the familiar New, Open, Save, and Save As commands. In this chapter, you'll learn how to make your application respond to read and write documents.

Here we'll stick with the Single Document Interface (SDI) application because it's familiar territory. Chapter 18 introduces the Multiple Document Interface (MDI) application, which is more flexible in its handling of documents and files. In both chapters, you'll get a heavy but necessary dose of application-framework theory; you'll learn a lot about the various helper classes that have been concealed up to this point. The going will be rough, but believe me, you must know the details to get the most out of the application framework.

This chapter's example, EX17A, is an SDI application based on the EX16B example from the previous chapter. It uses the student list document with a CFormView-derived view class. Now the student list can be written to and read from disk through a process called serialization. Chapter 18 shows you how to use the same view and document classes to make an MDI application.



Programming Microsoft Visual C++
Programming Microsoft Visual C++
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net