Suppose you don't need multiple views of your document but you plan to take advantage of the application framework's file support. In this case, you can forget about the UpdateAllViews and OnUpdate functions. Simply follow these steps when you develop the application:
The sequence of events for this simplified document-view environment is as follows.
Application starts | CMyDocument object constructed
CMyView object constructed View window created CMyView::OnCreate called (if mapped) CMyDocument::OnNewDocument called CMyView::OnInitialUpdate called View object initialized |
User edits data | CMyView functions update CMyDocument data members |
User exits application | CMyView object destroyed
CMyDocument object destroyed |