IDE에서 자동으로 생성되는 파일들은 도데체 뭔 파일일까?

IDE에서 자동으로 생성되는 파일들은 도데체 뭔 파일일까?

Wizard를 사용하여 새로운 Project( MFC Wizard, ActiveX Control Wizard )를 생성하면 새로운 여러 가지 시작 파일이 자동으로 생성된다. 이제부터 Visual C++ project와 관련된 모든 종류의 파일에 대하여 설명하겠다. Project에 삽입되는 실제 파일은 Project의 종류와 wizard에서 선택하는 option에 따라 달라진다. 여기에서 사용한 “PRJNAME”은 project의 이름이 이야기한다.

Project Files and Makefiles

이 것은 development environment에서 사용되는 workspace 파일이다.이 파일은 하나의 workspace에서 모든 project를 조직한다.

이 것은 development environment에서 사용되는 workspace option 파일이다. 현재 생성한 workspace에대한 사용자가 선택한 option을 저장한다. 그래서 project workspace를 열때마다 사용자가 정의한 모습의 workspace의 모습을 볼수 있다.

이것은 development environment 내부에서 사용하는 project 파일이다. 이전의 VC버전에서는 이 파일의 확장자가 .MAK이었다. 이 파일에는 현재 project에서의 특정한 정보를 저장한다. 생성한 각각의 project 에 대하여 .DSP 파일이 존재한다. .DSP 파일은 NMAKE와 양립할 수 없다. NMAKE를 사용하여 bulid하기 위해서는 Makefile를 export해야한다.

ClassWizard에서 사용하는 이 파일은 현재 project의 class들에 대한 정보를 저장한다.

This file contains the Object Description Language source code for a control type library. This file is used by Visual C++ to generate a type library. The generated library exposes the controls interface to other Automation clients.

이 파일은 No compile Browser 파일이다. 이 파일은 ClassView, WizardBar, 그리고 Component Gallery에서 사용하는 파서( 문법 분석기 )에 의하여 생성된 정보를 저장한다. 이 파일이 지워지게 되면 자동으로 다시 만들어 주니 걱정하지 말아라.

A file (located in the parent directory of the project ) that describes each file in your project using the actual filenames created by AppWizard or ControlWizard
<< 이 아래 부분은 뺄까 생각하다가 필요한 분이 있을 것 같아 영문 자료를 첨가 합니다. 영어가 어렵지 않으니 쉽게 해석할 수 있을 겁니다. 스스로 해석하는 습관을 기릅시다.>>

Program or Control Source and Header Files

This is the main include file for the program or DLL. It contains all global symbols and #include directives for other header files. It derives the CPrjnameApp class from CWinApp and declares an InitInstance member function. For a control, the CPrjnameApp class is derived from COleControlModule.

This file is the main program source file. It creates one object of the class CPrjnameApp (which is derived from CWinApp) and overrides the InitInstance member function.

For executables, CPrjnameApp::InitInstance does several things. It registers document templates, which serve as a connection between documents and views, creates a main frame window, and creates an empty document (or opens a document if one is specified as a command-line argument to the application).

For DLLs and ActiveX (formerly OLE) controls, CProjNameApp::InitInstance registers the control's object factory with OLE by calling COleObjectFactory::RegisterAll and makes a call to AfxOLEControlInit. In addition, the member function CProjNameApp::ExitInstance is used to unload the control from memory with a call to AfxOleControlTerm.

This file also registers and unregisters the control in the Windows registration database by implementing the DllRegisterServer and DllUnregisterServer functions.

These files declare and implement the CProjnameCtrl class. CProjnameCtrl is derived from COleControl, and skeleton implementations of some member functions are defined that initialize, draw, and serialize (load and save) the control. Message, event, and dispatch maps are also defined.

These files are created if you choose a dialog-based application. The files derive and implement the dialog class, named CProjnameDlg, and include skeleton member functions to initialize a dialog and perform dialog data exchange (DDX). Your About dialog class is also placed in these files instead of in PROJNAME.CPP.

in a dialog-based program, these are 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. This file is one of the templates provided by MFCAPWZ.DLL.

These files derive and implement the document class, named CProjnameDoc, and include skeleton member functions to initialize a document, serialize (save and load) a document, and implement debugging diagnostics.

These files are created if you create a program that supports a database and contains the recordset class.

These files derive and implement the view class, named CProjnameView, that is used to display and print the document data. The CProjnameView class is derived from CEditView, CFormView, CRecordView, CDaoRecordView, CTreeView, CListView, CRichEditView, CScrollView, or CView and has skeleton member functions to draw the view and implement debugging diagnostics. If you have enabled support for printing, 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.

These files declare and implement the CProjnamePropPage class. CProjnamePropPage is derived from COlePropertyPage and a skeleton member function, DoDataExchange, is provided to implement data exchange and validation.

These files are created if the Mini-Server or Full-Server option is selected in AppWizard'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.

These files 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 AppWizard's Application Options page (step 4 of 6).

These files 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.

Precompiled Header Files

These files are used to build a precompiled header file PROJNAME.PCH and a precompiled types file STDAFX.OBJ. It is important that you neither define nor undefine any of the _AFX_NO_XXX macros in stdafx.h. See the Knowledge Base article “PRB: Problems Occur When Defining _AFX_NO_XXX”. You can find Knowledge Base articles on the MSDN Library CD, or at

Resource Files

This is the resource file for the project and its header file. The resource file contains the default menu definition and accelerator and string tables for a generic MFC application. It also specifies a default About box and an icon file (RESPROJNAME.ICO). The resource file includes the file AFXRES.RC for standard Microsoft Foundation class resources. If toolbar support has been specified as an option, it also specifies the toolbar bitmap file (RESTOOLBAR.BMP).

The RC2 file can be included at the top of the RC file in a project. An RC2 file is useful for including resources used by several different projects. Instead of having to create the same resources several times for different projects, you can put them in an RC2 file and include the RC2 file into the main RC file.

If the project is for a DLL, this is the module-definition file for the project. For a control it provides the name and description of the control, as well as the size of the run-time heap.

This is the icon file for the MFC program or control. This icon appears when the application is minimized and is also used in the About box.

This bitmap file is used to represent your program or control in a toolbar or palette. This bitmap is included in the project's resource file. The initial toolbar and status bar are constructed in the CMainFrame class.

Help File Option

This batch file (located in the parent directory) is used to create the help file PROJNAME.HLP for your program or control.

This file (located in the parent directory) is the Help project file used by the Help compiler to create your program or control's Help file.

This Help file (located in the HLP subdirectory) contains template topics that you can edit and information on customizing your .HPJ file.

This file provides the structure for the Contents window in Windows Help.

This file, created if printing support is selected (which it is by default), describes the printing commands and dialog boxes.

This bitmap is used by standard Help file topics to represent bulleted lists.

Other File Options

This is the user license file. This file must be present in the same directory as the program or DLL to allow an instance of the control to be created in a design-time environment. Typically, you will distribute this file with a control, but your customers will not distribute it.

This file is created in two cases. (1) You have selected any Automation server option or an Automation option. (2) You have selected a document file extension (one of the options available in the Advanced Options dialog). The file demonstrates the kind of registration settings the framework will set for you.

This file is created only if you have chosen any Automation server support and have also chosen the Dockable Toolbar option. The file contains tiled images for the toolbar when the server application is in-place activated inside a container application. The file is similar to the standard RESTOOLBAR.BMP except that many nonserver commands are removed.



You may also like...

Leave a Reply