(一)Xtreme库文件汉化:
1、将Include/L.cn下的XTResource.rc复制到Include目录下,替换原先的文件,由于该中文资源文件的汉化不是十分彻底,你可以自己把该文件中其余的英文翻译为中文;
2、在VC中打开XTToolkit_Dll\XTToolkit_Dll.dsw工程文件,现在你可以打开ResourceView观察汉化后的对话框和字符串;
3、如果现在你编译的话,会发现资源文件编译错误,这是因为你还没有设定合适的字符编码,不过有些朋友运气好的话,可能仍然可以通过编译,但在运行会发生乱码现象,因此,设定资源的字符编码是必须的。通过菜单【View->Resource Includes...】,修改“Compile-time directives:”框中的内容:
LANGUAGE 4, 2
#pragma code_page(936)
4、OK!可以编译了,不过别忘了打开Build工具栏,选择不同的编译模式哦!注 :在汉化的同时,你可以修改src/XTGlobal.cpp文件,这个文件里面有一个Bug,不过它只对Debug模式编译的文件敏感,修改如下:// if ( ( lfHorz.lfCharSet & SYMBOL_CHARSET ) == 0 ) // line 274
if ( ( lfHorz.lfCharSet & DEFAULT_CHARSET ) == 0 )
(二)向导的汉化
1、打开工程文件XTAppWizard_v6\XTAppWizard.dsw;(我用的VC6)
2、修改文件XTAppWizardAw.cpp,如下:// This is called immediately after the custom AppWizard is loaded. Initialize
// the state of the custom AppWizard here.
void CXTAppWizardAppWiz::InitCustomAppWiz()
{
// Create a new dialog chooser; CDialogChooser's constructor initializes
// its internal array with pointers to the steps.
m_pChooser = new CDialogChooser;// At first, we don't know the total number of steps, since there are two
// possible "tracks" (MDI/SDI app and dialog-based app).
SetNumberOfSteps(-1);// Inform AppWizard of the languages we support
//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"));
SetSupportedLanguages(_T("中文 [中国] (APPWZCHS.DLL);0x80404b0\nEnglish [United States] (APPWZENU.DLL);0x40904b0\nSpanish [International Sort] (APPWZESP.DLL);0xc0a04b0\nFrench [Standard] (APPWZFRA.DLL);0x40c04b0\nItalian [Standard] (APPWZITA.DLL);0x41004b0"));
//-----------------------------------------------------------------------
// Initial settings for the standard control bar class.
//-----------------------------------------------------------------------
..........
........
2、OK,你可以编译了,生成的XTAppWizard_vc6.awx文件将自动复制为(MSDEVDIR)\Template\XTAppWizard.awx;
3、运行向导时请选择中文资源。
注 :你可以对Wizard的对话框资源进行汉化,不过这仅仅是向导的界面汉化,对于向导的运行结果没有半点影响。