Minor changes into a way locales are get and listed

svn path=/trunk/; revision=14824
This commit is contained in:
Aleksey Bragin 2005-04-26 21:21:32 +00:00
parent c5106fcc0a
commit 23e1c587a2

View file

@ -47,7 +47,8 @@ BOOL CALLBACK LocalesEnumProc(
TCHAR lang[255];
int index;
swscanf(lpLocale, L"%lx", &lcid); // maybe use wcstoul?
//swscanf(lpLocale, L"%lx", &lcid); // maybe use wcstoul?
lcid = wcstoul(lpLocale, NULL, 16);
GetLocaleInfo(lcid, LOCALE_SLANGUAGE, lang, sizeof(lang));
@ -74,7 +75,7 @@ CreateLanguagesList(HWND hwnd)
EnumSystemLocalesW(LocalesEnumProc, LCID_SUPPORTED);
// Select current locale
GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, sizeof(langSel)); // or should it be System?
GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SLANGUAGE, langSel, sizeof(langSel)); // or should it be System and not user?
SendMessageW(hList,
CB_SELECTSTRING,