Copyright © 2002-2009 MultiMedia Soft 
Return to index  
 
abmCellsGetLogFont function 
 
Remarks
Obtains the font settings for the text of the cell identified by the UniqueID identifier. 
Obtained font settings can be changed using the abmCellsSetLogFont function. 
Further information about cells management can be found inside the How to manage cells section.
Return value
Value
Meaning
 
 
FALSE
The operation failed
TRUE
The operation was successful
Syntax
BOOL abmCellsGetLogFont
HWND hWndBtn
short nUniqueID, 
void *pLogFont 
); 
 
 
Parameters
Description
hWndBtn
Windows handle associated to the button.
nUniqueID
Numerical value representing the cell's unique identifier
pLogFont
Address in memory of the the LOGFONT structure containing the font settings. Refer to the Microsoft documentation for details about the LOGFONT structure.
 
Visual Basic example 
 
' add a cell, with UniqueID, 1000 to a subclassed command button 
abmCellsAddCell Command1.hwnd, 1000, 0, 0, 50, 50, "Cell text" 
 
' obtain the current font settings 
Dim lfCell As LOGFONT 
abmCellsGetLogFont Command1.hwnd, 1000, lfCell 
 
' change the needed fields only 
lfCell.lfItalic = True 
lfCell.lfFaceName = "Times New Roman" 
 
' send the new font settings to the control 
abmCellsSetLogFont Command1.hwnd, 1000, lfCell 
 
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 
 
// add a cell to a button identified by IDC_BUTTON 
HWND hWndBtn = GetDlgItem (IDC_BUTTON)->GetSafeHwnd (); 
abmCellsAddCell (hWndBtn, 1000, 0, 0, 50, 50, "Cell Text"); 
 
// obtain the current font settings 
LOGFONT lfCell; 
abmCellsGetLogFont (hWndBtn, 1000, &lfCell); 
 
// change the needed fields only 
strcpy (lfCell.lfFaceName, "Times New Roman"); 
lfCell.lfItalic = 1; 
 
// send the new font settings to the control 
abmCellsSetLogFont (hWndBtn, 1000, &lfCell); 
With this code the font used to render the text of cell with UniqueID 1000 will be changed into Italic and Times New Roman. 
 
 
 
 
 
 
 
Copyright © 2002-2009 MultiMedia Soft 
Return to index