TerSetUserFont
Set font to use instead of the current font during RTF input or keyboard entry.
BOOL TerSetUserFont(hWnd, typeface, TwipsSize, StyleOn, StyleOff)
HWND hWnd; | The handle of the window to be accessed |
LPBYTE typeface; | typeface of the new font |
int TwipsSize; | The twips size (20 twips = 1 point) to use |
int StyleOn; | The style bits to turn-on. Please refer to the SetTerCharStyle method for a list of valid style bits. |
int StyleOff; | The style bits to turn-off. Please refer to the SetTerCharStyle method for a list of valid style bits. |
Comment: This method can be called from within the OverrideFont event to change the current font.
Return Value: This function returns TRUE if successful.
Example:
// Replace the current font selection by an Arial, 10 point, bold style. Turn-off an Italic style.
OverrideFont:
TerSetUserFont(hWnd,"Arial",10*20, BOLD, ITALIC);