Today, I have encountered this problem. I used to remember that a netizen answered this question. According to the piece of memory and search results in MSDN today, finally got it, and quickly recorded the solution.
In an environment where XtremeToolkit 2.0 is installed, the application created by the Xtreme Wizard is not available in Chinese. Thus, the application generated by this wizard is unable to use Chinese, when you add Chinese resources in the application generated by this wizard, the display will be garbled.
How to solve this problem?
Method 1, fundamentally solve the problem. Change the wizard to generate Chinese projects.
Principle: When using the XTreme Wizard to establish an application, the first step, as shown in the following figure, in the selection language item, Chinese is not supported. This option is controlled by SetSupportedLanguages (LPCTSTSTSUPPPPortedlangs).
This function can be found in member functions of CCUSTOMAppWiz in INITCUSTOMAPPWIZ. Its parameters are constituted by / n-divided language items:
"Language-Name # 1 (appwz * .dll-name # 1); Translation-Identifier # 1 / N
Language-name # 2 (appwz * .dll-name # 2); Translation-Identifier # 2 / N ...
... Language-Name # i (appwz * .dll-name # i); translation-ideiff # I / n "
For details, please refer to MSDN.
Start modification, if you are like me, get XtremeToolkit 2.0retailversion (referred to as XT), then your situation is like me. In this way, we got at least his source code. The XT provides its own wizard, and you can find this project in the start menu after installation, ApplicationWizard (6) under the ToolkitProject menu, here the resulting wizard is used in Visual C 6.0. Open, find the members of the class cxtappwizardappwiz INITCUSTOMAPPWIZ (), you will see the function of the control language option in this function.
SetSupportedLanguages (_T ( "German [Standard] (APPWZDEU.DLL); 0x40704b0 / nEnglish [United States] (APPWZENU.DLL); 0x40904b0 / nSpanish [International Sort] (APPWZESP.DLL); 0xc0a04b0 / nFrench [Standard] (APPWZFRA. DLL); 0x40c04B0 / Nitalian [Standard] (AppWzita.dll); 0x41004B0 ")); modify this, add Chinese support.
amend as below:
SetsupportedLanguages (_t ("Chinese [简体] (appwzchs.dll); 0x80403A8 / N German [standard] (Appwzdeu.dll); 0x40704B0 / N English [US] (AppWzenu.dll); 0x40904B0 / N Spain [International Sort] Appwzesp.dll); 0xc0A04B0 / N French [Standard] (AppWZFRA.DLL); 0x40C04B0 / N Italy [Standard] (Appwzita.dll); 0x41004B0 "));
Ok, compile, generate the release version, exit the Visualc environment.
Find the codejock software-> wizards-> launch deployment wizard in the start menu. Go directly to the third step, choose the following illustration, next step until it is completed. Reope with the Visual C running environment, use Xtreme Toolkit AppWizard, enter the first step, you will see that Chinese already appears in the selection menu. Compile the generated file, but the Chinese interface.
Second, the use of the guide to build an English-converted project into support for Chinese resources.
Open the project, click View-> Resource INCLUDES, you will see a dialog box that pops up, which is as follows:
#if! defined (AFX_RESOURCE_DLL) || Defined (AFX_TARG_ENU)
#ifdef _win32
Language 9, 1
#pragma code_page (1252)
#ENDIF / / / WIN32
#include "res / tes.rc2" // Non-Microsoft Visual C Edited Resources
#include "afxres.rc" // standard components
#include "afxprint.rc" // printing / print preview resources
#ENDIF
Language and code page We have modified to Chinese, so when you change resources in the project to Chinese, you will automatically call Chinese resources. According to my experience, I am transferring the engineering of an English into Chinese, just reinserting a copy of the menu into a copy, change into Chinese resources, and it is possible. But there is no problem if direct changes.
The above content is modified as follows:
#if! defined (AFX_RESOURCE_DLL) || Defined (AFX_TARG_CHS)
#ifdef _win32
Language 4, 2
#pragma code_page (936)
#ENDIF / / / WIN32
#include "res / tes.rc2" // Non-Microsoft Visual C Edited Resources
#include "afxres.rc" // standard components
#include "afxprint.rc" // printing / print preview resources
#ENDIF
At this point, let's look back in the parameters in SetsupportedLanguages, which is some strings consisting of "Chinese [Simplified] (AppWzchs.dll; 0x80403A8 / N", which is another hexadecimal string, which is the following, high Byte Representation Language 0804, i.e., LCID, low representation 03A8 code page 936.
The last job, in order to make you
XtremeToolkit
Full support Chinese, we are installed in its installation directory
Include
Next, you can see
L.cn
Folder, this folder is a Chinese support resource, copy it to
Include
Next, cover the original file, open, if you find that he is garbled, then, he is Chinese, you have no way, I am garbled, I have been in the future, so you can see it in the future.
XtremeToolkit