Using Win32 functions in Visual FoxPro Image Gallery
National Language Support
..msdn
CompareString
GetACP
GetCurrencyFormat
GetDateFormat
GetLocaleInfo
GetNumberFormat
GetOEMCP
GetStringTypeEx
GetSystemDefaultLangID
GetSystemDefaultLCID
GetSystemDefaultLocaleName
GetThreadLocale
GetUserDefaultLangID
GetUserDefaultLCID
GetUserDefaultLocaleName
GetUserGeoID
LCIDToLocaleName
LocaleNameToLCID
NormalizeString
SetUserGeoID
Code examples:
GetCurrencyFormat
..msdn    Add comment     W32 Constants      Translate this page
Formats a number string as a currency string for a locale specified by identifier.
Code examples:
Declaration:
int GetCurrencyFormat(
  _In_       LCID Locale,
  _In_       DWORD dwFlags,
  _In_       LPCTSTR lpValue,
  _In_opt_   const CURRENCYFMT *lpFormat,
  _Out_opt_  LPTSTR lpCurrencyStr,
  _In_       int cchCurrency
);
FoxPro declaration:
DECLARE INTEGER GetCurrencyFormat IN kernel32;
    INTEGER Locale,;
    INTEGER dwFlags,;
    STRING lpValue,;
    INTEGER lpFormat,;
    STRING @lpCurrencyStr,;
    INTEGER cchCurrency
Parameters:
Locale [in]
Locale identifier that specifies the locale for which this function formats the currency string.

dwFlags [in]
Flags controlling currency format. The application must set this parameter to 0 if lpFormat is not set to NULL.

lpValue [in]
Pointer to a null-terminated string containing the number string to format: characters "0" through "9", one decimal point (dot) if the number is a floating-point value, A minus sign in the first character position if the number is a negative value.

lpFormat [in, optional]
Pointer to a CURRENCYFMT structure that contains currency formatting information.

lpCurrencyStr [out, optional]
Pointer to a buffer in which this function retrieves the formatted currency string.

cchCurrency [in]
Size, in characters, of the lpCurrencyStr buffer.
Return value:
Returns the number of characters retrieved in the buffer indicated by lpCurrencyStr if successful.

If the cchCurrency parameter is set to 0, the function returns the size of the buffer required to hold the formatted currency string, including a terminating null character.
Usage:
cBuffer = REPLICATE(CHR(0), 256)

= GetCurrencyFormat(;
    GetThreadLocale(),;
    0,;
    "210.56",;
    0,;
    @cBuffer,;
    LEN(cBuffer))

cBuffer = STRTRAN(m.cBuffer, CHR(0), "")
? cBuffer
My comment:
See also: GetNumberFormat, GetDateFormat
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2014-09-28 10:41:44
Modified: 2014-09-28 11:18:22
Visited in last 7 days: 63
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.234.247.118)
15 sec.Function: 'FindNextVolume'
30 sec.Example: 'Displaying dimmed window behind VFP top-level form'
46 sec.Function: 'waveOutSetVolume'
1.05 min.Function: 'MapViewOfFile'
1.32 min.Function: 'GdipDeletePen'
1.62 min.
Function group: 'Raw Input'
1.87 min.Function: 'LockServiceDatabase'
2.15 min.Function: 'CertOpenSystemStore'
2.38 min.Function: 'SetMailslotInfo'
2.63 min.Function: 'CeReadRecordProps'
Google
Advertise here!