| Locale-Sensitive Windows C++ Function int GetNumberFormat(LCID Locale, DWORD dwFlags, LPCTSTR lpValue, CONST NUMBERFMT *lpFormat, LPTSTR lpNumberStr, int cchNumber);  int GetNumberFormatA(LCID Locale, DWORD dwFlags, LPTSTR lpValue, CONST NUMBERFMT *lpFormat, LPSTR lpNumberStr, int cchNumber);  int GetNumberFormatW(LCID Locale, DWORD dwFlags, LPWTSTR lpValue, CONST NUMBERFMT *lpFormat, LPWSTR lpNumberStr, int cchNumber); Internationalization (I18n) Function OverviewThe GetNumberFormatfunction formats the number stringlpValueinto a number string customized for the 
locale specified byLocaleand the options specified
bydwFlagsandlpFormat, and stores the resulting string inlpNumberStr.
If successful, it returns the number ofTCHARs, including the null-terminating character, 
written tolpNumberStr. In the event of an error,GetNumberFormatreturns0and
sets extended error information that can be obtained by callingGetLastError. cchNumbershould be set to either the size, inTCHARs, of thelpNumberStrbuffer, or to0, in which case, the function returns 
the number ofTCHARsrequired to hold the information, and the buffer pointed to bylpNumberStris not used.
 GetNumberFormatAis the narrow version of the function, wherelpValueandlpNumberStrare single or multibyte strings andcchNumberand the return are byte length values.
 GetNumberFormatWis the wide version of the function, wherelpValueandlpNumberStrare wide-character strings andcchNumberand the return are wide-character (WCHAR) length values.
 See the MSDN Library for 
additional information. I18n IssuesUse the appropriate version of the function as required for internationalization support, noting the following: Formulate the correct LCIDto pass intoGetNumberFormat. 
Although there are two predefinedLCIDconstants that may be used:LOCALE_SYSTEM_DEFAULT(the system's default locale returned byGetSystemDefaultLCID) 
andLOCALE_USER_DEFAULT(the current user's default locale returned byGetUserDefaultLCID),
neither of these will work in an internationalized application where the locale is independent of 
the user's system settings. Ensure that if cchNumberis non-zero, it is set correctly for the chosen platform; bytes for the narrow version andWCHARsfor the wide version. See Locale-Sensitive Length Functions 
for a discussion on multibyte and wide character sizes. Recommended Replacements*When possible, use the Generic version of the function, rather than the narrow or wide versions, and let the Windows #define UNICODEswitch determine which version of the function will be called.  
*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.   
 |