Platform SDK: International Features |
The SetThreadLocale function sets the calling thread's current locale.
BOOL SetThreadLocale ( LCID Locale // locale identifier );
Value | Meaning |
---|---|
LOCALE_SYSTEM_DEFAULT | Default system locale. |
LOCALE_USER_DEFAULT | Default user locale. |
For more information, see Locales.
If the function succeeds, the return value is a nonzero value.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
When a thread is created, it uses the system default thread locale. The system reads the system default thread locale from the registry when the system boots. This system default can be modified for future process and thread creation using Control Panel's International application.
The SetThreadLocale function affects the selection of resources that are defined with a LANGUAGE statement. This affects such functions as CreateDialog, DialogBox, LoadMenu, LoadString, and FindResource, and sets the code page implied by CP_THREAD_ACP, but does not affect FindResourceEx.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Winnls.h; include Windows.h.
Library: Use Kernel32.lib.
National Language Support Overview, National Language Support Functions, CreateDialog, DialogBox, LoadMenu, LoadString, FindResource, GetThreadLocale, GetSystemDefaultLCID, GetUserDefaultLCID, MAKELCID