MFC Document/View - New Milestone :: C++
Hi.
I began and finished reading chapter 9 of Prosise's book on MFC today. I believe I have reached a milestone in the journey to become a proficient...good MFC programmer.
Here is what I know.
MFC = application object->frame window->view->documents
Promise emphasized that documents as an abstract concept object including data. I interpret documents as dealing with the program's "purpose" i.e. program theme.
Nonetheless, I have not come to a complete understanding as to what comes first: view or documents. For example, as program designer and developers, we should always walk the steps of a program user. I am not completely sure as to where is the clear separation of view and documents, event though view is the program interpreter. View does the drawing according to the data from documents.
For example, let say I am working on a program that reads data from a file and puts it on a window in *binary* mode. Let say I create three classes using AppWizard and ClassWizard:
1) ConceptPro (mainframe window)
2) view
3) document
First, the classes above are MFC's generated classes.
Conception is the application object and it handles all the taskbar, menu, etc.
View draws the childframe, *binary* data from a file, etc.
Documents handles the data such as filename, file data, etc.
Is the description above valid? Please point out where I am "going off track" or "missed something important."
Lastly, let say I have other classes that manipulate the data in the file *before* outputing it. Where should I instantiate these classes in documents or in view? I am not completely clear as to rank of document and view.
Thanks,
Kuphryn