views:

36

answers:

2

How can I disable the digit substitution (for example for Hindi numerals instead of Arabic ones) for my application (native c++) completely?

I want all the numbers displayed with 0123 instead of ٠١٢٣

There is an option in localization options in windows, but I don't want to change that for the user. Only for my app.

Thank you!

+1  A: 

Slightly confused by you saying native C++ and still having a WinForms tag...

Assuming that it's a native C++ app without any .Net, I'd look at the SetThreadLocale function as described here.

ho1
thank you for the answer, but this does not work in any case. see this posting the gdi functions do not honor the settings. http://blogs.msdn.com/b/michkap/archive/2008/06/16/8603298.aspx
Uwe
+1  A: 

Not sure if it'll work, but try to call SetLocalInfo with the LCType parameter set to LOCALE_IDIGITSUBSTITUTION. Take a look at the MSDN documentation for GetLocalInfo and SetLocalInfo. It does not seem to be possible to change all values programmatically, also I'm not sure if this will only affect the active process. Hope this helps!

humbagumba
thanks, but this changes it for the user. I only want to do this for one app.
Uwe