Form Topics

Home

You can add forms to any Visual C++ application that supports the MFC libraries, including a forms-based application (one whose view class is derived from CFormView). If you didn't initially create your application to support forms, Visual C++ will add this support for you when you insert a new form. In an SDI or MDI application, which implements the default document/view architecture, when the user chooses the New command (by default, on the File menu), Visual C++ prompts the user to choose from the available forms.

With an SDI application, when the user chooses the New command, the current instance of the form closes and the user can open another instance of that form or any other available form. In an MDI application, the current instance of the form continues to run when the user chooses the New command.

Note   You can insert a form into a dialog-based application (one whose dialog class is based on CDialog and one in which no view class is implemented). However, without the document/view architecture, Visual C++ does not automatically implement the File|New functionality. You must create a way for the user to view additional forms, such as by implementing a tabbed dialog box with various property pages.

When you insert a new form into your application, Visual C++ does the following:

For applications based on the document/view architecture, the New Form command also:

What do you want to do?

Create a forms-based application

Insert a form into a project