MFC Program or Control Source and Header Files
For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.
The following files are created when you create an MFC project in Visual Studio, depending on the options you select for the project you create. For example, your project contains Projnamedlg.cpp and Projnamedlg.h files only if you create a dialog-based project or class.
All of these files are located in the Projname directory, and in either the Header Files (.h files) folder or Source Files (.cpp files) folder in Solution Explorer.
|Projname.h||The main include file for the program or DLL. It contains all global symbols and |
|Projname.cpp||The main program source file. It creates one object of the class |
For DLLs and ActiveX (formerly OLE) controls,
This file also registers and unregisters the control in the Windows registration database by implementing the
|Projnamectrl.h, Projnamectrl.cpp||Declare and implement the |
|Projnamedlg.cpp, Projnamedlg.h||Created if you choose a dialog-based application. The files derive and implement the dialog class, named |
|Dlgproxy.cpp, Dlgproxy.h||In a dialog-based program, the implementation and header file for the project's Automation proxy class for the main dialog. This is only used if you have chosen Automation support.|
|Projnamedoc.cpp, Projnamedoc.h||Derive and implement the document class, named |
|Projnameset.h/.cpp||Created if you create a program that supports a database and contains the recordset class.|
|Projnameview.cpp, Projnameview.h||Derive and implement the view class, named |
The project's view class contains skeleton member functions to draw the view and implement debugging diagnostics. If you have enabled support for printing, then message-map entries are added for print, print setup, and print preview command messages. These entries call the corresponding member functions in the base view class.
|ProjnamePropPage.h, ProjnamePropPage.cpp||Declare and implement the |
|IPframe.cpp, IPframe.h||Created if the Mini-Server or Full-Server option is selected in the application wizard's Automation Options page (step 3 of 6). The files derive and implement the in-place frame window class, named CInPlaceFrame, used when the server is in place activated by a container program.|
|Mainfrm.cpp, Mainfrm.h||Derive the CMainFrame class from either CFrameWnd (for SDI applications) or CMDIFrameWnd (for MDI applications). The CMainFrame class handles the creation of toolbar buttons and the status bar, if the corresponding options are selected in the application wizard's Application Options page (step 4 of 6). For information on using CMainFrame, see The Frame-Window Classes Created by the Application Wizard.|
|Childfrm.cpp, Childfrm.h||Derive the CChildFrame class from CMDIChildWnd. The CChildFrame class is used for MDI document frame windows. These files are always created if you select the MDI option.|