Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 5: The Document/View Architecture


// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();

return TRUE;
}

You can also display an empty main frame when the application starts and let the user
create a document based on the available types from the main menu. Here is such a menu
from Borland Image Editor:

As you can see, creating an MDI is not necessarily too difficult but it can involve a few
more steps than an SDI. Therefore, whenever we need an MDI, unless specified
otherwise, we ill use the AppWizard.

5.4.3 The Visual C++ AppWizard..............................................................


Microsoft Visual C++ provides various wizards to assist you with performing some tasks.
Particularly, to create an application, it offers the AppWizard. AppWizard offers a
convenient step-by-step series of choices to create various types of applications such as
an SDI or an MDI (it offers many other choices of applications).

5.5 The AppWizard.............................................................................................

Free download pdf