[Previous] [Next]

Chapter 11

Multiple Documents and Multiple Views

Document/view applications aren't limited to just one document and one view of a document's data. Using splitter windows provided by MFC, a single document interface (SDI) application can present two or more views of the same document in resizeable "panes" that subdivide the frame window's client area. The document/view architecture also extends to multiple document interface (MDI) applications that support multiple views of a document, multiple open documents, and even multiple document types. Although Microsoft discourages the use of the multiple document interface, applications that rely on the MDI model are still prevalent and probably will be for some time to come, as evidenced by the continued success of Microsoft Word and other leading Microsoft Windows applications.

In Chapter 9, you saw what it takes to write an SDI document/view application. You'll find it a simple matter to extend that paradigm to encompass multiple documents and multiple views. In this chapter, we'll first examine MFC's support for MDI applications and see how easy it is to build an MDI application. Then we'll look at how splitter windows are used to provide multiple views of documents open in SDI applications.

The CHM file was converted to HTML by chm2web software.