呵呵,昨天也有个朋友在问类似问题~相信遇到过类似问题的朋友还很多
现整理一下给大家提供两种方法:一:
其实很简单,我想大家都知道为什么我们做好的程序在别的系统下运行会出现乱码所以我们就可以考虑为我们这个软件在其它的系统运行时将该软件系统的进程的区域语言设置为我们想要的
这样就不会出来乱码了
幸运的是MS为大家提供了这样一个函数:
SetThreadLocale
SetThreadLocale
The SetThreadLocale function sets the calling thread's current locale. BOOL SetThreadLocale (
  LCID Locale   // locale identifier
);
Parameters
Locale 
[in] Specifies the new locale for the calling thread. This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values. Value Meaning 
LOCALE_SYSTEM_DEFAULT Default system locale. 
LOCALE_USER_DEFAULT Default user locale. 
For more information, see Locales. Return Values
If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call GetLastError. Res
When a thread is created, it uses the system default thread locale. The system reads the system default thread locale from the registry when the system boots. This system default can be modified for future process and thread creation using Control Panel's International application. The SetThreadLocale function affects the selection of resources that are defined with a LANGUAGE statement. This affects such functions as CreateDialog, DialogBox, LoadMenu, LoadString, and FindResource, and sets the code page implied by CP_THREAD_ACP, but does not affect FindResourceEx. Windows 2000/XP: Do not use SetThreadLocale to select a UI language. To select the proper resource that is defined with a LANGUAGE statement, use FindResourceEx.Requirements 
  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  Windows 95/98/Me: Unsupported.
  Header: Declared in Winnls.h; include Windows.h.
  Library: Use Kernel32.lib.
具体用法朋友们请直接看上面的吧,应该都能懂;二:用delphi版某位前辈写的一套组件好像是TNT,不过在有的时候不好用.可能还有其它的方法,请大家补充;
同时散点分,恭喜月亮MM当版主了

解决方案 »

  1.   

    stgsd 
    汉语汉字就是好 
    等 级:
     发表于:2007-12-20 13:16:1311楼 得分:0 
    不懂鸟语啊,特别是计算机英语。 
    哪位高人翻译下。 
     
    ----
    下个金山吃吧再看
      

  2.   

    貌似在Vista下没法用,还是我不会用阿?
      

  3.   

    用这个也不行,http://www.cnblogs.com/hbifts/articles/4521.html
      

  4.   

    UTF-8问题一直没有解决,借宝地用下,多谢楼主,下面是问题地址:
    http://topic.csdn.net/u/20071008/09/95cba471-9b81-459a-a882-bf5cab09d08a.html?seed=1109283837