CellsManager.CellGetLogFont |
|
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);
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
|