mingwah
August 25th, 1999, 05:47 AM
Hi,
How can I change the System Code Page from my application?
I'm not just talking about the individual Time/Date/Currency/Measure/Weight/etc. formats, but the system code page.
What I actually want to do is to change the code page in such a way that all processes and windows are notified of this code page change.
The only idea I have is to change the system default code page, and then broadcast a WM_SETTINGCHANGE. Is this a correct way? I don't know how to do it.
Help, anyone?
Regards,
Ming_Wah THAM
August 25th, 1999, 07:39 AM
Hi,
Look into the function: SetLocaleInfo() and MAKELCID(), both are needed to create a Custom Locale with the pre-sets you desire.
mingwah
August 26th, 1999, 04:48 AM
Hi,
I checked up the SetLocaleInfo() function. Perhaps I've read wrongly, but this function could only set certain "UserOverrideable" LCTYPEs, which are the Time/Currency/Weight/Measures/etc...
Moreover, I tried writing a small piece of code to try it out, and I found that the Regional Setting in the Control Panel remains unchanged. This cause me to think that perhaps SetLocaleInfo changes only the Locale for my program alone? I may be wrong, of course.
Although using GetLocaleInfo(), I could obtain the DefaultLangID, DefaultLocaleID and DefaultCodePage, these values cannot be changed by SetLocaleInfo. They are not in the "UserOverrideable" list.
I've search high and low in the documentation, but I couldn't find anything that could enable me to change the System Default Locale Settings, ie, the Language setting in the Regional Settings applet of the Control Panel.
Let me state more specifically what I want to do. Suppose that in the normal English Windows, the Regional Settings is "English (United States)". Now when my program starts up, I would like it to programmatically change the setting to, say, "French (Standard), or "German (Swiss)", depending on the choice of the user. My program allows the user to change the Regional Settings without going into the Control Panel. And after making this change, the new Regional settings must be known to all existing and new windows in the system. When my program exits, it will change the settings back to "English (United States)".
I know this can be done, because I've seen Japanese programs automatically changing my Regional Settings into "Japanese(Kanji)" during the duration of the program, and then reverting on exit.
I just don't know how to do it. *sigh* Please help. Thanx.
Regards,
Ming_Wah THAM.
steing
June 11th, 2002, 11:06 AM
This is exactly what I'm looking for also, I'd like to change the System Locale setting in Windows 2000 programmatically.
Is this possible at all??