SetTerDefaultFont
Set the default font and pointsize
BOOL SetTerDefaultFont(hWnd, typeface, PointSize, style, color, repaint)
HWND hWnd; | The handle of the window to be accessed |
LPBYTE typeface; | typeface of the default font |
int PointSize; | Point size for the default font. You can also specify the font size in twips by specifying a negative value (1 point equal 20 twips) |
UINT style; | style of the default font. Refer to the SetTerCharStyle function for a list of style constants. Use 0 for default. |
COLORREF color; | default text color. Use 0 for default. |
BOOL repaint; | TRUE to refresh the window after this operation |
Description: This function is used by an application to change the initial or default font for the editor. Any text that used the previous default font now gets printed with the new font, point size, style and color.
Return Value: This function returns TRUE if successful.
Example:
// use Arial typeface and 12 pointsize for default.
SetTerDefaultFont(hWnd,"Arial",12, 0,0, TRUE);
// use Arial typeface and 12 pointsize
SetTerDefaultFont(hWnd,"Arial",-240, 0, 0, TRUE);