I'm trying to find out how the "regional format" setting on Windows 10 can be retrieved (see picture below).
I tried GetLocaleInfoEx
, with virtually all combinations of parameters, but this one showed up nowhere.
On the other hand this setting has an influence on what's returned by GetThreadLocale
:
Some examples with expected return values from GetThreadLocale
as per this Microsoft documentation, C++ code at the end of the question.
+--------------------------+-----------------------------------+
| Regional format | Value returned by GetThreadLocale |
+--------------------------+-----------------------------------+
| French (Switzerland) | 0x100c |
| French (France) | 0x040c |
| German (Germany) | 0x0407 |
| English (United states) | 0x0409 |
| English (United Kingdom) | 0x0809 |
+--------------------------+-----------------------------------+
Some examples with unexpected (and undocumented) return values from GetThreadLocale
:
+-----------------------+-----------------------------------+
| Regional format | Value returned by GetThreadLocale |
+-----------------------+-----------------------------------+
| English (Switzerland) | 0x0c00 |
| English (Germany) | 0x0c00 |
| German (Italy) | 0x0c00 |
+-----------------------+-----------------------------------+
I really wonder what this 0x0c00
value returned by GetThreadLocale
is?
C++ code
#include <windows.h>
#include <stdio.h>
int main()
{
printf("GetThreadLocale: %08x\n", GetThreadLocale());
}