Window Message Notification - Language and Locale - windows

I want to find out what win message is / are sent when we change the locale settings, Date Time and Language in particular.
I know when window Theme is changed we receive WM_THEMECHANGED.

WM_SETTINGSCHANGE for locale settings and WM_TIMECHANGE for time changes.
You will get WM_INPUTLANGCHANGEREQUEST before the language is changed (and you can choose whether to accept or reject the change), and then WM_INPUTLANGCHANGE after the language is successfully changed (if you pass WM_INPUTLANGCHANGEREQUEST to the DefWindowProc).

WM_TIMECHANGE is sent whenever system time is changed.
WM_SETTINGCHANGE is also sent upon change of some modifications. However, it's done on a volunteer base by the app that changes the setting. One can assume standard Control Panel applets are fair players.

Related

I am editing mouse settings in the registry but they seem to do nothing

I have made a program to change the mouse sensivity in the same way as you can do it with the Control Panel.
The changes are made in the registry, the keys at HKEY_CURRENT_USER\Control Panel\Mouse and they are in fact done (I have checked them from regedit.exe) but the mouse works as if this changes are not made. In other words, the changes do not take any effect, they only do if you use the control panel. Why do they not take effect?
Windows registry isn't something that is refreshed all the time. The changes you made will be applied after the current user (that's why it's HKEY_CURRENT_USER) logs in again, or as you said after using control panel, which will read the registry. I don't know, what language your program is written in, but you should check out this link: "https://msdn.microsoft.com/en-us/library/ms724947.aspx"
In general, tweaking registry settings directly is unsupported, especially when there's an API to tweak the setting. In this case, the API is SystemParametersInfo. In particular, you need to use the SPI_SETMOUSESPEED as the argument for the uiAction parameter.
In other words, the changes do not take any effect, they only do if you use the control panel. Why do they not take effect?
Because there's often a little more to it than setting the value in the registry. Often there is a notification that must be sent after changing the value in order to tell the all the other software on the machine to drop any cached values and replace them with the new value that's now in the registry. In many cases, the notification will be in the form of a broadcast message.
In the case of mouse driver settings, you probably need to use the SPIF_UPDATEINIFILE argument for the fWinIni parameter. You might also need to OR it with SPIF_SENDCHANGE to broadcast a WM_SETTINGCHANGE message, but I'm not sure about that.

Detect specific key regardless of language setting

(Windows interop here)
Background:
ConEmu is a program I just found, very cool, allowing a lot of features for interacting with the command line. However, it has a "Quake" feature where you would hit a key and get a console dropping out of the top like in most FPS games. I found a bug where it would not work properly depending on the language setting of the user. You can check the bug report if you want to know about it.
Question:
Is there a way to hook a callback into a specific key (not character, but specific key on the keyboard), regardless of the language setting the user has?

VBScript GetLocale returns the wrong value

I'm trying to test some scripting that will run on non-English Windows installations. I'm trying to simulate that by installing the required languages and setting my locale accordingly.
However, when I run the VBScript, I notice that the language box in the task bar changes back to en-US, and the GetLocale function always returns 1033.
What else do I need to do to properly simulate a different locale?
Language box in the task bar has nothing to do with GetLocale.
If GetLocale is giving you 1033, your current system locale must be set to English(United States). Follow these steps to check (On Windows 7)
Go to Region and Language
Select Administrative tab
In the section Language for non-Unicode programs click on Change system locale
Once you change this setting, don't forget to do IISReset.
Based on my own research, it appears to be the "Format" setting in the Region and Language control panel that corresponds with the GetLocale value.
Unfortunately, this has no bearing on the display language for the OS, which is what I was really interested in.

Windows: Language Bar will not show input method options for some of my windows

I am trying to make our application properly handle international input. Since we handle text input and font rendering ourselves, I wrote custom code to handle the respective WM_IME_* messages.
Now, this all works fine, with one exception: When our applications main window is open, the Language Bar will not let me pick any options. I can set the input language to Japanese or Korean, but the menus for choosing the input methods (like Hangul or Hiragana) are not shown. Then, when I open another window (any other window, be it one of our application windows, or a standard "save file" dialog), the options appear. Once there, they will stay, even if I close the other window. IME input will then work as expected in the main window. But, as explained, only if I open another window first.
Now, how does windows decide whether it should display the input method options or not? It appears that windows does not recognize our main window as Unicode capable for some reason. How can I fix that?
Thanks in advance for any suggestions,
jonas
Edit: One more strange thing i noticed is that for my main window (which will not let me change input methods), I will get a WM_INPUTLANGUAGECHANGEREQUEST message when i change the input language - which I pass on to DefaultWindowProcW. For the windows which let me change the input method, i don't get the request, i just get a WM_INPUTLANGUAGECHANGE message (which I don't get for the other window).
Ok, after a long search I've been able to find out what is breaking this. We are calling SetFocus on a child window in response to WM_FOCUS messages, so that a specific child window always gets focused when a window is brought to the front. Apparently, this confuses window's IME code, and makes it unaware that the window can handle IME input.
Some notes
Text Service is works per window, not system wide, so even its turn on in one window, another window will still need to turn it on, (unless user set it as default)
And Text Service is not working in any windows, to enable that, target computer need to enable following setting on

Programmatically Changing XP Appearance Settings

I am trying to silently apply very specific appearance settings for a single user with poor eyesight on an XP machine.
I can alter the settings by using the appearance tab of the display settings dialog and clicking apply/ok. Doing this works however the user cannot see well enough to change her settings back to how she likes them each time she logs on.
Just changing the registry keys does not make the desired changes until the user logs off and then on again. For reasons that would take too long to explain, I cannot simply get the user to log off and then on again. I need the settings to be applied immediately upon login.
So! I either need to force windows to apply the display settings, a process which seems to be associated with the 'Please Wait' dialog, screenshot included OR I need to programmatically change the appearance settings individually (which includes altering 'Advanced' font-size settings).
Many thanks.
Please Wait Example http://www.dur.ac.uk/alexander.holmes2/b/pleasewait.jpg
Does this user have his/her own windows User? (his/her own account on XP). It should keep settings for you if you have them as a separate user from whoever else likes the larger DPI. Just create a user.

Resources