CString Format( DWORD dwFlags = 0, LCID lcid = LANG_USER_DEFAULT );
Return Value
A CString that contains the formatted currency value.
Parameters
dwFlags
Indicates flags for locale settings, possibly the following flag:
lcid
Indicates locale ID to use for the conversion.
Remarks
Call this member function to create a formatted representation of the currency value. It formats the value using the national language specifications (locale IDs). A currency symbol is not included in the value returned. If the status of this COleCurrency object is null, the return value is an empty string. If the status is invalid, the return string is specified by the string resource IDS_INVALID_CURRENCY.
Example
COleCurrency curA; // value: 0.0000
curA.SetCurrency(4, 500); // value: 4.0500
// value returned: 4.05
curA.Format(0, MAKELCID(MAKELANGID(LANG_CHINESE,
SUBLANG_CHINESE_SINGAPORE), SORT_DEFAULT));
// value returned: 4,05
curA.Format(0, MAKELCID(MAKELANGID(LANG_GERMAN,
SUBLANG_GERMAN_AUSTRIAN), SORT_DEFAULT));
Note For a discussion of locale ID values, see the section Supporting Multiple National Languages in the Win32 SDK OLE Programmer’s Reference.
COleCurrency Overview | Class Members | Hierarchy Chart
See Also COleCurrency::ParseCurrency, COleCurrency::GetStatus