Copyright © 1998-2015 MultiMedia Soft

CellsManager.CellGetLogFont

Previous pageReturn to chapter overviewNext page

Remarks

Obtains the font settings for the text of the cell identified by the UniqueID identifier.

The current font settings can be changed using the CellsManager.CellSetLogFont method.

For further details about cells management, see the How to manage cells section

 

Syntax

Visual Basic

control.CellsManager.CellGetLogFont (UniqueID as integer, font as long) as boolean

 

Visual C++

BOOL control.CellsManager.CellGetLogFont (short UniqueID, long font);

 

Parameter

Description

 

 

UniqueID

Numerical value representing the cell's unique identifier

font

Address in memory of the the LOGFONTW structure (need using the UNICODE version in C++) containing the font settings. Refer to the Microsoft documentation for details about the LOGFONT structure.

 

Visual Basic example

 

'obtain the current font settings

Dim font As LOGFONT

MyButton.CellsManager.CellGetLogFont 1000, VarPtr(font)

 

' change the needed fields only

font.lfFaceName = "Times New Roman"

font.lfItalic = True

 

' send the new font settings to the control

MyButton.CellsManager.CellSetLogFont 1000, VarPtr(font)

With this code the font used to render the text of cell with UniqueID 1000 will be changed into Italic and Times New Roman

 

Visual C++ example

 

// must use the UNICODE version of LOGFONT

LOGFONTW   font;

 

// obtain the current font settings

MyButton.GetCellsManager ().CellGetLogFont (1000, (long) &font);

 

// change the needed fields only

wcscpy (font.lfFaceName, L"Times New Roman");

font.lfItalic = 1;

 

// send the new font settings to the control

MyButton.GetCellsManager ().CellSetLogFont (1000, (long) &font);

With this code the font used to render the text of cell with UniqueID 1000 will be changed into Italic and Times New Roman; note that, being the control UNICODE compatible, you will need to compile your code with UNICODE or, as in the sample above, use the UNICODE version of LOGFONT (LOGFONTW).

 

Return value

 

Value

Meaning

 

 

FALSE

The operation failed

TRUE

The operation was successful