Spread 8.0 Documentation
SSGetFont, SSSetFont, SSSetFontRange Functions
Support Options
DLL Reference > DLL Functions > SSGetFont, SSSetFont, SSSetFontRange Functions

Glossary Item Box

SSGetFont, SSSetFont, SSSetFontRange Functions


See Also    ActiveX

Applies To

fpSpread DLL control

Description

Set or return the font used in a cell, a column, a row, or the entire sheet, or set the font used in a block of cells.

Syntax

C

HFONT SSGetFont(HWND hWnd, SS_COORD Col, SS_COORD Row);

BOOL SSSetFont(HWND hWnd, SS_COORD Col, SS_COORD Row, HFONT hFont, BOOL fDeleteFont);

BOOL SSSetFontRange(HWND hWnd, SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, HFONT hFont, BOOL fDeleteFont);

C++

HFONT TSpread::GetFont(SS_COORD Col, SS_COORD Row);

BOOL TSpread::SetFont(SS_COORD Col, SS_COORD Row, HFONT hFont, BOOL fDeleteFont);

BOOL TSpread::SetFontRange(SS_COORD Col, SS_COORD Row, SS_COORD Col2, SS_COORD Row2, HFONT hFont, BOOL fDeleteFont);

Parameters

The SSGetFont function has the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell
Row Row number of cell

The SSSetFont and SSSetFontRange functions have the following parameters:

Parameter Description
hWnd Window handle of the fpSpread control
Col Column number of cell or column number of upper-left cell of the block if specifying a block for the SSSetFontRange function
Row Row number of cell or row number of upper-left cell of the block if specifying a block for the SSSetFontRange function
Col2 Column number of lower-right cell of the block if specifying a block for the SSSetFontRange function
Row2 Row number of lower-right cell of the block if specifying a block for the SSSetFontRange function
hFont Handle to the font to use
fDeleteFont Determines whether the Spread control deletes the font after it is no longer needed

This function is applied to the current sheet setting unless you first call the SSSetSheet function to specify the sheet for which you are calling this function. To determine the settings you want for the Col, Row, Col2, and Row2 parameters, see Using Column and Row Properties.

Remarks

Use the SSSetFontRange function to specify the font for a block of cells.

For the SSSetFont and SSSetFontRange functions, set the fDeleteFont parameter to TRUE if you want the fpSpread control to delete the font handle after the font is no longer needed. Set the parameter to FALSE if you want the application to delete the font.

Note: If you are using the Spread DLL control with a language that uses the double-byte character set (DBCS), you must change the font to a font that supports DBCS.

Return Value

SSGetFont: The return value is a handle to the font used by the cell. Refer to your development environment's documentation for more information on fonts.
SSSetFont, SSSetFontRange: TRUE if the function completes successfully; FALSE otherwise.

See Also

Setting the Font

SSSetSheet function

ActiveX Correspondence

Font, FontBold, FontItalic, FontName, FontSize, FontStrikethru, FontUnderline properties

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.