1. Formatting numbers/money according to Locale in Win32?
- Posted by Jeremy Cowgar <jeremy at cowgar?c?m> May 04, 2008
- 743 views
Does anyone know how to format numbers/money in Win32 according to the locale? In linux, you simply use strfmon. I have localization complete in Linux. Just need the number/money formatting in Windows. I'm looking for a C api call. I see GetCurrencyFormat() but thus far have been unable to find where it's actually defined. All uses come back with a function id of -1. -- Jeremy Cowgar http://jeremy.cowgar.com
2. Re: Formatting numbers/money according to Locale in Win32?
- Posted by jacques deschênes <desja at globetr??ter.net> May 04, 2008
- 718 views
ref: http://msdn.microsoft.com/en-us/library/ms776318(VS.85).aspx GetCurrencyFormat is in kernel32.dll but there 2 version of it ANSI and UNICODE GetCurrencyFormmatA and GetCurrencyFormatW Jacques Deschênes Jeremy Cowgar wrote: > > Does anyone know how to format numbers/money in Win32 according to the locale? > In linux, you simply use strfmon. I have localization complete in Linux. Just > need the number/money formatting in Windows. > > I'm looking for a C api call. I see GetCurrencyFormat() but thus far have been > unable to find where it's actually defined. All uses come back with a function > id of -1. > > -- > Jeremy Cowgar > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
3. Re: Formatting numbers/money according to Locale in Win32?
- Posted by Jeremy Cowgar <jeremy at c?wgar.co?> May 05, 2008
- 724 views
jacques deschênes wrote: > > > ref: <a > href="http://msdn.microsoft.com/en-us/library/ms776318">http://msdn.microsoft.com/en-us/library/ms776318</a>(VS.85).aspx > GetCurrencyFormat is in kernel32.dll but there 2 version of it ANSI and > UNICODE > GetCurrencyFormmatA and GetCurrencyFormatW > Ah. GetCurrencyFormatA... In the docs I was looking at it is references GetCurrencyFormat. Great. I found GetNumberFormat as well. So, now date/time, number and currency formatting are all locales based on the OS locale data! -- Jeremy Cowgar http://jeremy.cowgar.com