Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtGridCellCurrency Help Topic ! Collapse All
Subject Author Date
Nader Mimouni Apr 17, 2006 - 9:35 AM

How can we get and set value in CExtGridCellCurrency class ?
Is there any help topic regarding this class ?
Best regards.

Technical Support Apr 17, 2006 - 12:04 PM

The CExtGridCellCurrency class is derived from VARIANT and allows you to use the following VARIANT types to store a numeric value:

- VT_I1
- VT_I2
- VT_UI1
- VT_UI2
- VT_I4
- VT_UI4
- VT_I8
- VT_UI8
- VT_R4
- VT_R8
- VT_INT
- VT_UINT
- VT_BOOL
- VT_ERROR
- VT_DATE
- VT_CY
- VT_DECIMAL
Here is a code snippet which assigns a double value to the cell:
CExtGridCellCurrency * pCellCurrency =
 STATIC_DOWNCAST(
  CExtGridCellCurrency ,
  m_wndGrid.GridCellGet(
   0,
   3L,
   0,
   0,
   RUNTIME_CLASS(CExtGridCellCurrency )
   )
 );
pCellCurrency->_VariantAssign( DOUBLE(123.456) );
The updated documentation will be available in the next major release (coming soon).

Nader Mimouni Apr 18, 2006 - 1:23 AM

And how can I get back the value from a variant cell ?
Many Thanks.

Technical Support Apr 20, 2006 - 10:40 AM

As we said before CExtGridCellCurrency is derived from VARIANT. So you can operate with this cell type in the same way as with VARIANT:

pCellCurrency->_VariantAssign( DOUBLE(123.456), VT_R8 );
 
 ASSERT( pCellCurrency->vt == VT_R8 );
 DOUBLE dVal = V_R8( pCellCurrency );