EDIT:
Question is reduced and optimized in response to community's comments. The deleted part of the question will be posted as separate question.
QUESTION:
Is there any WM_SOMETHING
or NM_SOMETHING
message in Win32 API
that can inform me about user changing the locale
?
You see, I could use that message/notification to change my program's locale
to the current locale
.
Something like this pseudo-code:
case WM_SOMETHING: // in my main window procedure
_wsetlocale( LC_ALL, L"" );
Also, if there is such message, and I process it as in the pseudo-code above, will it adjust only main window's locale
or will it also set locale
for child dialog boxes and controls?.
MY EFFORTS TO SOLVE THIS:
After browsing through Internet, the only thing I found was WM_INPUTLANGCHANGE
, WM_SETTINGCHANGE
and WM_INPUTLANGCHANGEREQUEST
messages, but I have never used them and do not know if they can solve my problem.
Thank you.
Best regards.
static
global variable and update it in response to this message. It could solve the problem with using properlocale
in dialog boxes. Still, I have another problem-say my app collects data and formsSQL
query in EN-US (INSERT INTO table VALUES(1.2);
). Before user clicks on "Save" he changeslocale
to EN-CA and only then clicks "Save". Now I get the query with1.2
instead of1,2
as argument and get error. How could I solve that case? I can not stop user from changinglocale
until my query executes so I must adapt to this case. Any thoughts? Thank you. – Trichloride