我在我的MFC程序中输入代码:
MessageBox("hero come here")
那个messagebox的按钮是“确定”
而在英文系统下同样的代码他就是“ok”我想要自己控制所有的messagebox 以及一些系统对话框 比如 查找文件之类的让他们用我指定的语言有人说是用SetThreadLocale 有人说是用SetLocaleInfo我大体实验了下 都不管事儿呢  是我用得不对吗 
我是在程序开头这样写:SetThreadLocale( 1033 );
那个SetLocaleInfo不太会用谁能帮忙啊 另hook的办法不好 还得自己写好多字串的

解决方案 »

  1.   

    你自己搞个Dialog类不就得了,然后DoModal()
      

  2.   

    说白了 假设我就是想让我的messagebox始终显示“OK”这个字样 不管是在任何操作系统下要如何办?
      

  3.   


    int MessageBoxEx(
      HWND hWnd,        
      LPCTSTR lpText,  
      LPCTSTR lpCaption,
      UINT uType,     
      WORD wLanguageId /* = LANG_ENGLISH*/
    );
      

  4.   

    就算你想,也要系统有中文语言才行啊
    还是自己写个dialog靠谱
      

  5.   

    For a list of the language identifiers supported by Win32, seeLanguage Identifiers. Note that each localized release of Windows and Windows NT typically contains resources only for a limited set of languages. Thus, for example, the U.S. version offers LANG_ENGLISH, the French version offers LANG_FRENCH, the German version offers LANG_GERMAN, and the Japanese version offers LANG_JAPANESE. Each version offers LANG_NEUTRAL. This limits the set of values that can be used with the wLanguageId parameter. Before specifying a language identifier, you should enumerate the locales that are installed on a system.
      

  6.   

    受教了 看来如果操作系统没装相关的语言包 不管怎么设置都是没用的啊
    估计只能自己写一大堆字串对应表 然后hook代码改动比较小吧谢谢各位的参与和解答