February 25, 2001

Structure of a VC++ program

Copied from from notes:

VC++ is a tool for building and debugging window based applications and libraries in an Integrated Windows Environment.

Any program which is generated by Application Wizard will have the following structure.









.CLW (Class Wizard)



.MAK file

This is the project file compatible with the Visual C++ Workbench.(App Wizard + Class Wizard + App Studio). This file is read by NMAKE program.

.RC file

This is the listing of all the Microsoft Windows resources that the program uses. It includes icons, bitmaps and cursors that are stored in RES subdirectory. This is edited by App Studio.

Application.H file

This is the main include file for the application. It includes other project specific includes (including RESOURCE.H) and declares the CxxxApp application class.

Application.CPP file

This is the main application source file that contains the application class CxxxxApp.

Definition File

This file contains information about the application that must be provided to run with Microsoft Windows. It defines parameters such as the name and description of the application, and the size of the initial local heap. The numbers in this file are typical for applications developed with the Microsoft Foundation Class Library. The default stack size can be adjusted by editing the project file.

Class Wizard File

This file contains information used by ClassWizard to edit existing classes or add new classes. ClassWizard also uses this file to store information needed to generate and edit message maps and dialog data maps and to generate prototype member functions.


These files contain the frame class CMainFrame, which is derived from CMDIFrameWnd and controls all MDI frame features.

TESTDOC.H, TESTDOC.CPP - the document file

These files contain your CxxxxDoc class. Edit these files to add your special document data and to implement file saving and loading (via CxxxxDoc::Serialize).

TESTVIEW.H, TESTVIEW.CPP - the view of the document

These files contain your CTestView class. CTestView objects are used to view CTestDoc objects.