BergJC
asked on
Win NT/ Decimal separator
Currently for Win95, I use the WIN.INI file to get the decimal and thousands separator for my application. I've noticed, however, that the Win NT WIN.INI file does not hold this information. Is there a NT equivalent, or am I going to have to used API calls to get that info?
You must be careful because depending on which regional settings for the machine are set will change the dec sep required. It is by far better to use the API call:
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" _
(ByVal Locale As Long, ByVal LCType As Long, ByVal lplCData As String, _
ByVal cchData As Long) As Long
Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" _
(ByVal Locale As Long, ByVal LCType As Long, ByVal lplCData As String, _
ByVal cchData As Long) As Long
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am aware of this API call to get the decimal separator. I've already written the code for regional settings, I just need the separators. I used the WIN.INI file because it was much simpler (and when you don't support the system, you want to make it as simple as possible for others). I'm guessing that from your answers that there isn't an equivalent to the entries inside the Win95 WIN.INI file for WinNT. Is this correct?
Yes, that it correct. The win.ini is not used anymore. The registry is always the most up to date information.
BTW: I think that using GetLocaleInfo is as easy as reading the win.ini
BTW: I think that using GetLocaleInfo is as easy as reading the win.ini
If comma and period swap their meaning, *THE SAME* mask will keep on working, giving always the right display.