Help Center

CMoney.SetValuesmethod

Sets the integer and fractional components.

Numeric Datatypesmethoddocumented

Syntax

FUNCTION SetValues (BYVAL nInteger AS LONGLONG, BYVAL nFraction AS SHORT) AS HRESULT

Parameters

NameDescription
nIntegerThe value to be assigned to the integer component of the m_currency data member. The sign of the integer component must match the sign of the existing fractional component. nInteger must be in the range CY_MIN_INTEGER to CY_MAX_INTEGER inclusive.
nFractionThe 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).

Description

Sets the integer and fractional components.

Remarks

Based on 4 digits. To set .2, pass 2000, to set .0002, pass a 2.

Reference

  • Defined in AfxNova/CMoney.inc:203
  • Documented in Numeric Datatypes/CMoney Class.md
  • Topic: CMoney Class