COleCurrency::COleCurrency

COleCurrency( );

COleCurrency( CURRENCY cySrc );

COleCurrency( const COleCurrency& curSrc );

COleCurrency( const VARIANT& varSrc );

COleCurrency( long nUnits, long nFractionalUnits );

Parameters

cySrc

A CURRENCY value to be copied into the new COleCurrency object.

curSrc

An existing COleCurrency object to be copied into the new COleCurrency object.

varSrc

An existing VARIANT data structure (possibly a COleVariant object) to be converted to a currency value (VT_CY) and copied into the new COleCurrency object.

nUnits, nFractionalUnits

Indicate the units and fractional part (in 1/10,000’s) of the value to be copied into the new COleCurrency object.

Remarks

All of these constructors create new COleCurrency objects initialized to the specified value. A brief description of each of these constructors follows. Unless otherwise noted, the status of the new COleCurrency item is set to valid.

For more information, see the CURRENCY and VARIANT entries in the Win32 SDK OLE Programmer’s Reference.

Example

The following examples show the effects of the zero-parameter and two-parameter constructors:

COleCurrency curZero;         // value: 0.0000
COleCurrency curA(4, 500);    // value: 4.0500
COleCurrency curB(2, 11000);  // value: 3.1000
COleCurrency curC(2, -50);    // value: 1.9950

COleCurrency OverviewClass MembersHierarchy Chart

See Also   COleCurrency::SetCurrency, COleCurrency::operator =, COleCurrency::GetStatus, COleCurrency::m_cur, COleCurrency::m_status