The OnOpenDocument() function is called by the framework when it receives an
“Open” command. The default implementation of this function opens the file and
calls the DeleteContents() member function to ensure that the document is empty.
In an SDI application, the framework uses this function to re-initialize the
existing document object, rather than creating a new one. But in an MDI
application, the framework constructs a new document object each time and then
calls this function to initialize it. Override this function if we want to use
something other than the archive mechanism for storing the data.
|