• MFC program chinese UI


    MFC program chinese UI

    - Multiple language support for MFC applications with extension DLL
    http://www.codeproject.com/KB/locale/MultiLangSupportMFCExtDLL.aspx

    关于Build Resource-only Language DLL
    All word "AFX_TARG_DEU" to "AFX_TARG_ENU".
    All word "LANG_GERMAN, SUBLANG_GERMAN" to "LANG_ENGLISH, SUBLANG_ENGLISH_US".
    "code_page(1252)" to "code_page(1252)"
    Under Resources tab change Language to English (United States)
    add "/NOENTRY" for both release and debug configuration

    关于Detect OS UI Language settings
    看代码,需要区分是否支持MUI, Windows 9x or NT4
    The current user's default language, as returned from the GetUserDefaultLangID() Win32 API.
    The system's default language, as returned from the GetSystemDefaultLangID() Win32 API.

    切换语言
    hLangDLL = ::LoadLibrary(szResDLLName);
    AfxSetResourceHandle( ghLangInst );

    关于Code Pages Supported by Windows
    http://msdn.microsoft.com/zh-CN/goglobal/bb964654.aspx
    932 (Japanese Shift-JIS)
    936 (Simplified Chinese GBK)
    949 (Korean)
    950 (Traditional Chinese Big5)

    关于预设字体
    http://cpatch.org/kiiali/theo/mui/font_choices2.htm
    0404, CHT, 繁體中文, 預設為 "PMingLiU" 新細明體 9, code_page 950
    /////////////////////////////////////////////////////////////////////////////
    // Chinese (Taiwan) resources

    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHT)
    #ifdef _WIN32
    LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
    #pragma code_page(950)
    #endif //_WIN32

    /////////////////////////////////////////////////////////////////////////////
    //
    // Dialog
    //

    1 DIALOG
    STYLE WS_CHILD | WS_CAPTION
    CAPTION "PLACERHOLDER TEXT"
    FONT 9, "新細明體"

    0804, CHS, 簡體中文, 預設為 "SimSun" 9, code_page 936
    ////////////////////////////////////////////////////////////////////////////
    // Chinese (P.R.C.) resources

    #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
    #ifdef _WIN32
    LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
    #pragma code_page(936)
    #endif //_WIN32

    /////////////////////////////////////////////////////////////////////////////
    //
    // Dialog
    //

    1 DIALOG
    STYLE WS_CHILD | WS_CAPTION
    CAPTION "PLACERHOLDER TEXT"
    FONT 9, "冼极"

  • 相关阅读:
    4、Cocos2dx 3.0三,找一个小游戏开发Hello World 分析
    Android Bluetooth开发
    详细解析BluetoothAdapter的详细api
    Android 蓝牙( Bluetooth)耳机连接分析及实现
    [Andriod官方API指南]连接之蓝牙
    Android蓝牙A2dp profile的使用
    Android中文API(129) —— AudioManager
    Android中的Audio播放:控制Audio输出通道切换
    JAVA ANDROID SOCKET通信检测(SERVER)连接是否断开
    Android Xfermode 实战 实现圆形、圆角图片
  • 原文地址:https://www.cnblogs.com/cutepig/p/2151431.html
Copyright © 2020-2023  润新知