1. Formatting numbers/money according to Locale in Win32?

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

new topic     » topic index » view message » categorize

2. Re: Formatting numbers/money according to Locale in Win32?

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>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Formatting numbers/money according to Locale in Win32?

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu