<< Return to Main Index

< Return to Class Index

CGXStyle::SetValue

CGXStyle& SetValue(LPCTSTR lpsz);

CGXStyle& SetValue(const char* lpsz);

CGXStyle& SetValue(const CString& s);

CGXStyle& SetValue(DWORD dw);

CGXStyle& SetValue(UINT ui);

CGXStyle& SetValue(WORD w);

CGXStyle& SetValue(short sh);

CGXStyle& SetValue(LONG l);

CGXStyle& SetValue(float f);

CGXStyle& SetValue(double d);

lpsz

Specifies the text to be used as value. In unicode builds, const char* will be converted to wide characters.

s

Const reference to a CString to be used as value.

dw

A DWORD value.

ui

A UINT value.

w

A WORD value.

sh

A short value.

l

A LONG value.

f

A float value.

d

A double value.

Return Value

Returns the this pointer.

Remarks

Initializes the value for the cell. The value will always be stored as string in the CGXStyle object but the ValueType will be set appropriately to GX_VT_NUMERIC for the numeric SetValue version or GX_VT_STRING for the string version.

When you are using the formula engine and a style object is passed to the engine, the engine will either store a number or a string based of the ValueType information. The formula engine stores values directly as double or as string.

See Also

CGXStyle::SetValueType

CGXStyle

Class Overview | Class Members