Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Get Currency Format (from Windows Regional Settin
Message
From
27/05/2008 09:01:04
 
 
To
27/05/2008 08:55:51
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01319630
Message ID:
01319631
Views:
19
This message has been marked as the solution to the initial question of the thread.
Hi Marc,

just missing 'AT's for passing by reference
GetCurrencyFormat(nLocale, 0, @cValue, 0, @cBuffer, Len(cBuffer))
>I found the following code, but it returns nothing. Why?
>
>DECLARE INTEGER GetCurrencyFormat IN "kernel32" ;
> INTEGER Locale,;
> INTEGER dwFlags,;
> STRING lpValue,;
> INTEGER lpFormat,;
> STRING lpCurrencyStr,;
> INTEGER cchCurrency
>
>cBuffer=SPACE(255)
>cValue = "12345.6"
>nLocale = 1033
>GetCurrencyFormat(nLocale, 0, cValue, 0, cBuffer, Len(cBuffer))
>
>* cBuffer is terminated with CHR(0)
>cBuffer = LEFT(cBuffer,AT(CHR(0),cBuffer)-1)
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform