VC ++ 6.0 rename the project name and its MFC project and class file name

Source: Internet
Author: User
VC ++ 6.0 rename the MFC project and class files

I personally tested that the project name was correct. Thank you very much for your hard work and achievements. Thank you very much! I have also specially reposted this article to share with you ^_^

We recommend that you use "replace" to modify the changes in batches to avoid missing changes, which is troublesome. In short, the modification will be successful by following the steps below.

 

Being a beginner in MFC, using VC ++ 6.0 is sometimes painful. I have been wondering how to rename the namespace and class files of the MFC project for a few days. Now there is a result. Please send the modification process.
First, there are several important files for the project created using MFC Appwizard (exe:
1. DWS file, which points to the DSP file used by the project. The main content is as follows:
Project: "mydemo" = "./mydemo. DSP"-package owner = <4>
2. DSP file: It stores various project information and is the main file to be modified.
3. RC file: Storage Project Resource Information
4. CLW file: stores the classes and resources corresponding to each form. classwizard will use it.
5. class files
Readme.txt of the MFC project is described in detail. If we need to modify the entire project, we need to modify all the above files. Of course, there are also most file names.

Next is the modification procedure:
1. Rename the Class Name:
In a later version of visual functions X, the class name is renamed. However, in the CPP file, the class names of some functions are not renamed. We can change it manually. Modifying the class name does not affect the entire project. However, if we modify the class file name next, the project cannot find the class. After modifying the class name, we changed the header file reference to the new header file name and then exited the project.
2. Modify the file name
Modify the class file to a new name. If you want to modify the namespace, change the names of all namespaces to a new one, including the files named after the old namespace in the resources folder.
3. Modify the project information.
If you modify the entire project, perform the following two steps, and skip to step 2.
(1) first use the notebook to open the DSW file and modify project: "mydemo" = "./mydemo. DSP"-package owner = <4> the color part is the project name.
(2) modify the resource file name in the RC file. Open the notebook and use crtl + F to find the old namespace and change it to a new one. This mainly involves modifying the old file names of. RC2 and. ICO. Because we renamed them in the resources folder.
(3). Modify the DSP file. Open the notebook. If you only want to modify the class file, modify the class name after source = to the new one. The location to be modified is shown below:
Source =./mydemo. h and Source =./mydemo. cpp
All class files to be modified are modified. To modify the entire project, press Ctrl + F to change the text of all old namespaces to new ones.
(4). Modify the CLW file. Open the notebook and modify the new name of the class corresponding to each form. In this way, we edit the form control and use classwizard to identify the new class. In addition, you can also delete the original CLW file and re-create one for VC ++ 6.0.
4. The modification is basically complete.Open the namespace. If the "load failed" error occurs in resources in the wordsapce navigation, the resource folders such as the form cannot be displayed. Click "window"-> "close" to reload the file.

PS: the modification may be incomplete, so this article is for reference only.

Author: cangtai

Source: http://www.cnblogs.com/WindWing/

The copyright of this article is shared by the author and the blog Park. You are welcome to repost this article. However, you must retain this statement without the author's consent and provide a clear link to the original article on the article page. Otherwise, you will be held legally liable.

 

Reprinted statement: This article from http://www.cnblogs.com/WindWing/archive/2009/08/24/1551801.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.