MFC program Chinese UI

Source: Internet
Author: User

MFC program Chinese UI

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

About 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 ".
& Quot; code_page (1252) & quot; To & quot; code_page (1252) & quot )"
Under resources tab change language to English (United States)
Add "/noentry" for both release and debug Configuration

About detect OS UI Language settings
Check the code to identify whether Mui is supported, 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.

Switch Language
Hlangdll =: loadlibrary (szresdllname );
Afxsetresourcehandle (ghlanginst );

About code pages supported by Windows
Http://msdn.microsoft.com/zh-CN/goglobal/bb964654.aspx
932 (Japan shift-JIS)
936 (Simplified Chinese GBK)
949 (Korean)
950 (Traditional Chinese big5)

About default Fonts
Http://cpatch.org/kiiali/theo/mui/font_choices2.htm
0404, CHT, traditional Chinese, set to "pmingliu" New simhei 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, "New Understanding"

0804, CHS, simplified Chinese, set to "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, "extremely powerful"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.