Re: [Emergency!] How to set system default language by code?
From: Ferdinand Oeinck (ferdo_at_nospam.bigroses.demon.nl)
Date: 02/12/04
- Next message: Dave: "RE: Edit Ctrl Focus Problems"
- Previous message: Balboos: "Re: Read highlighted text"
- In reply to: WizardLee: "[Emergency!] How to set system default language by code?"
- Next in thread: WizardLee: "Re: [Emergency!] How to set system default language by code?"
- Reply: WizardLee: "Re: [Emergency!] How to set system default language by code?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 12 Feb 2004 13:05:24 +0100
I use:
char szLang[32];
char szCountry[32];
char szCodePage[32];
if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SENGLANGUAGE,
szLang, sizeof(szLang)) > 0)
{
if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SENGCOUNTRY,
szCountry, sizeof(szCountry)) > 0)
{
if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_IDEFAULTANSICODEPAGE,
szCodePage, sizeof(szCodePage)) > 0)
{
CString loc;
loc.Format("%s_%s.%s", szLang, szCountry, szCodePage);
setlocale(LC_ALL, loc);
}
}
}
Ferdinand.
"WizardLee" <WizardLeeCN@hotmail.com> wrote in message
news:exwzKUK8DHA.1816@TK2MSFTNGP12.phx.gbl...
> Hi, all,
>
>
> A new feature is required to add to my program today. But I do not have
any
> idea about it.
> The feature should implement these two functions:
>
> 1, Select "Install files for East Asia languages" in control panel
> applet "Regional and Language Option" in "Language" tabpage, then apply;
>
> 2, According to user's selection, choose "Chinese (PRC)" or "Chinese
> (TaiWan)" or something else for "Non-unicode application language" in
> "Advanced" tabpage, then apply;
>
> This feature may require Windows setup CD and may need reboot.
>
>
> Thans very very very much!
> WizardLee
>
>
- Next message: Dave: "RE: Edit Ctrl Focus Problems"
- Previous message: Balboos: "Re: Read highlighted text"
- In reply to: WizardLee: "[Emergency!] How to set system default language by code?"
- Next in thread: WizardLee: "Re: [Emergency!] How to set system default language by code?"
- Reply: WizardLee: "Re: [Emergency!] How to set system default language by code?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|