Original http://blog.csdn.net/ylforever/article/details/6745611
I. background
When the software needs to release multiple different language versions, there are different requirements on the resource editing menus, buttons, and dialog box size and shapes. For example, if the length of a word is different between Chinese and English characters, the button size is different if the word is used as the button title. At this time, there are two solutions: 1. dynamically adjust the button size through the code, which is troublesome and destroys the WYSIWYG rules of VC resource editing. 2. Prepare two sets of resources and use different resources to compile different versions. The following describes the detailed steps for the second method.
2. Steps (take creating resources of both English and Chinese versions as an example)
1) The English version is created by default to complete resource editing. There is an RC file in the project directory, which is an RC file in English version by default.
2) copy the file as a Chinese RC file.
3. Add resources to the VC project and select vcreszh. RC as follows.
You can have two sets of resources in the resource view.
4. Add the compilation option to select the English/Chinese version for compiling. Create a new debugzh in configuration management to compile the Chinese version.
5. Set the attributes of the RC file and link different resources under different compilation options.
Vcres. RC is excluded when debugzh is compiled; vcreszh. RC is excluded when debug is compiled. As a result, you can compile different versions by selecting different switches.
3. Note
You need to modify the resources in two copies at the same time. Otherwise, the core issue may occur.