Using Documents
Working together, documents and views:
Contain, manage, and display your application-specific data.
Provide an interface consisting of document data variables for manipulating the data.
Participate in writing and reading files.
Participate in printing.
Handle most of your application's commands and messages.
The document is particularly involved in managing data. Store your data, normally, in document class member variables. The view uses these variables to access the data for display and update. The document's default serialization mechanism manages reading and writing the data to and from files. Documents can also handle commands (but not Windows messages other than WM_COMMAND).