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:
GetNumberFormat
..msdn    Add comment     W32 Constants      Translate this page
Formats a number string as a number string customized for a locale specified by identifier.
Code examples:
Declaration:
int GetNumberFormat(
  _In_       LCID Locale,
  _In_       DWORD dwFlags,
  _In_       LPCTSTR lpValue,
  _In_opt_   const NUMBERFMT *lpFormat,
  _Out_opt_  LPTSTR lpNumberStr,
  _In_       int cchNumber
);
FoxPro declaration:
DECLARE INTEGER GetNumberFormat IN kernel32;
    INTEGER Locale,;
    INTEGER dwFlags,;
    STRING lpValue,;
    INTEGER lpFormat,;
    STRING @lpNumberStr,;
    INTEGER cchNumber

Parameters:
Locale [in]
Locale identifier that specifies the locale.

dwFlags [in]
Flags controlling the operation of the function. 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 NUMBERFMT structure that contains number formatting information, with all members set to appropriate values.

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

cchNumber [in]
Size, in TCHAR values, for the number string buffer indicated by lpNumberStr.
Return value:
Returns the number of TCHAR values retrieved in the buffer indicated by lpNumberStr if successful.

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

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

cBuffer = STRTRAN(m.cBuffer, CHR(0), "")
? cBuffer
My comment:
See also: GetCurrencyFormat, 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:53:49
Modified: 2014-09-28 11:18:43
Visited in last 7 days: 60
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.80.10.56)
6 sec.Example: 'Transparent Menu Class (requires VFP9)'
14 sec.Function: 'PathIsURL'
20 sec.Function: 'LockWorkStation'
25 sec.Function: 'GetNearestColor'
31 sec.Function: 'SQLSetConfigMode'
37 sec.Function: 'GdipDeleteMatrix'
44 sec.Function: 'listen'
51 sec.Function: 'RegQueryValueEx'
56 sec.Function: 'SQLFetch'
1.1 min.Function: 'SHGetFolderPath'
Google
Advertise here!