Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
BOOL ParseCurrency( LPCTSTR lpszCurrency**, DWORD** dwFlags = 0,LCID lcid = LANG_USER_DEFAULT );
throw( CMemoryException );
throw( COleException );
Return Value
Nonzero if the string was successfully converted to a currency value, otherwise 0.
Parameters
lpszCurrency
A pointer to the null-terminated string which is to be parsed.
dwFlags
Indicates flags for locale settings, possibly the following flag:
- LOCALE_NOUSEROVERRIDE Use the system default locale settings, rather than custom user settings.
lcid
Indicates locale ID to use for the conversion.
Remarks
Call this member function to parse a string to read a currency value. It uses national language specifications (locale IDs) for the meaning of nonnumeric characters in the source string.
For a discussion of locale ID values, see the section in the Win32 SDK OLE Programmer’s Reference.
If the string was successfully converted to a currency value, the value of this COleCurrency object is set to that value and its status to valid.
If the string could not be converted to a currency value or if there was a numerical overflow, the status of this COleCurrency object is invalid.
If the string conversion failed due to memory allocation errors, this function throws a CMemoryException. In any other error state, this function throws a COleException.
Example
// works if default locale has dot decimal point
COleCurrency cur;
cur.ParseCurrency("$135.95", 0);
ASSERT(cur == COleCurrency(135, 9500));
COleCurrency Overview | Class Members | Hierarchy Chart
See Also COleCurrency::Format, COleCurrency::GetStatus