Inserting a Form into a Project
Forms provide a convenient container for controls. You can easily insert an MFC-based form into your application, so long as the application supports the MFC libraries.
forms, inserting into a project; forms, adding to a project; inserting forms; Insert New dialog box; forms, Insert New Form dialog box
To insert a form into your project
From ClassView, select the project to which you want to add the form, and click the right mouse button.
From the shortcut menu, choose New Form.
If the New Form command is not available, your project may be based on the ActiveX Template libraries (ATL). To add a form to an ATL project, you must when first creating the project.
In the New Form dialog box, type a name for the form.
The remaining fields under Form Information are automatically generated from the form name.
Use the Automation area to specify whether the form will support automation.
Use the Document Template Information fields to specify information about the document associated with the form.
Click Change if you want to change the generated file extension, or other aspects of the template such as the name displayed in the Save as Type dialog box, the New dialog box, and so forth.
Visual C++ adds the form to your application, opening it inside the Dialog editor so that you can begin adding controls and working on its overall design.
You may want to perform the following additional steps (not applicable for dialog-based applications):
Override the OnUpdate member function.
Implement a member function to move data from your view to your document.
Create an OnPrint member function.