Export (0) Print
Expand All

CComCurrency::GetFraction 

Call this method to return the fractional component of the CComCurrency object.


SHORT GetFraction( ) const;

Returns the fractional component of the m_currency data member.

The fractional component is a 4-digit integer value between -9999 (CY_MIN_FRACTION) and +9999 (CY_MAX_FRACTION). GetFraction returns this value scaled by 10000 (CY_SCALE). The values of CY_MIN_FRACTION, CY_MAX_FRACTION, and CY_SCALE are defined in atlcur.h.

// CComCurrency::GetFraction Example
   CComCurrency cur(10,5000);
   int nFract;
   nFract = cur.GetFraction();
   ATLASSERT(nFract == 5000);

Community Additions

ADD
Show:
© 2015 Microsoft