Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CComCurrency::Round

 

Call this method to round the currency to a specified number of decimal places.


      HRESULT Round(
   int nDecimals 
);

nDecimals

The number of digits to which m_currency will be rounded, in the range 0 to 4.

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

Example

CComCurrency cur(10, 1234);
cur.Round(3);
ATLASSERT(cur.GetFraction() == 1230);   

Requirements

Header: atlcur.h

Show: