In This Chapter
Working with MFC SDI projects
Defining a new MFC SDK project
Using the document/view architecture
Creating the code for the example SDI project
Using the resulting example application
Many applications rely on the Single Document Interface (SDI). The SDI is an application that opens just one document at a time and presents a single view of that document. For example, Notepad is an example of an SDI application. SDI applications are extremely useful because they can simplify user tasks and make working with the application considerably easier. However, they also have drawbacks that this chapter discusses.
The Microsoft Foundation Classes (MFC) architecture for the SDI and Multiple Document Interface (MDI) application are separate documents and views. A document is the data portion of the application. However, most users need to see the data contained in the document, which is where the view comes into play. You find a complete discussion of the document/view architecture later in this chapter.
One of the best ways to see SDI applications in action is to build one of your own. The example in this chapter is a basic text editor. After you create the example, you can augment it as desired to handle any text file on your system. The amazing thing is that there are many forms of text file out there right now that you might not quickly think about. For example, an XML file is simply a text file in disguise. Having the basic text editor in ...