Поделиться через


CComCurrency::SetFraction

Call this method to set the fractional component of a CComCurrency object.

HRESULT SetFraction(
   SHORT nFraction 
);

Параметры

  • nFraction
    The value to be assigned to the fractional component of the m_currency data member. The sign of the fractional component must the same as the integer component, and the value must be in range -9999 (CY_MIN_FRACTION) to +9999 (CY_MAX_FRACTION).

Возвращаемое значение

Returns S_OK on success, or an error HRESULT on failure.

Пример

CComCurrency cur(10, 0);
cur.SetFraction(5000);
ATLASSERT(CComCurrency(10, 5000) == cur);   

Требования

Header: atlcur.h

См. также

Основные понятия

CComCurrency Class

CComCurrency Members

CComCurrency::GetFraction

CComCurrency::SetInteger

CComCurrency::SetInteger