Creating a Starter OLE Container
AppWizard contains options that make it easy to create a starter application with OLE container functionality.
To create a starter OLE container application
-
On the File menu, click New.
The New dialog box appears.
-
Click the Projects tab.
-
Click MFC AppWizard (exe).
-
In the Project Name box, type
Container
.
AppWizard creates a project directory with this name under the main (root) directory specified in the Location box.
-
If necessary, use the Location box to specify a different root directory for the Container project files that AppWizard creates under the Container project directory.
-
If any check boxes other than Win32 appear in the Platforms box, clear them.
-
Click OK.
AppWizard creates the project directory, and the MFC AppWizard - Step 1 dialog box appears. Click Next to accept the default options.
-
Click Next in the MFC AppWizard - Step 2 of 6 dialog box to accept the default options.
-
In the MFC AppWizard - Step 3 of 6 dialog box, click Container, and then click Next to continue.
-
In the MFC AppWizard - Step 4 of 6 dialog box, click Advanced.
The Advanced Options dialog box appears.
-
If necessary, click the Document Template Strings tab.
-
Click Next again to accept the default options for MFC AppWizard - Step 5 of 6.
-
In the MFC AppWizard - Step 6 of 6 dialog box, change the defaults that AppWizard suggests for class CContainerCntrItem. Select the class and make the following changes:
-
In the Class name box, change the class name to CContainerItem.
-
In the Header file box, change the filename to ContainerItem.h.
-
In the Implementation file box, change the filename to ContainerItem.cpp.
-
Click Finish.
-
The New Project Information dialog box appears, summarizing the settings and features AppWizard will generate for you when it creates your project.
-
Click OK in the New Project Information dialog box.
AppWizard creates the starter files for Container and opens the project.
In the next topic, you will build the starter Container application AppWizard just created and try out some of the features it already has. Then, you will modify the code AppWizard created to add more features.