TerGetFontParam
Retrieve the font parameters.
long TerGetFontParam(hWnd, FontId, type)
HWND hWnd; | The handle of the window to be accessed |
int FontId; | FontId (0 to TotalFonts-1). Set to 0 to specify the default font. You can also use this function to get the font information for a stylesheet item by specifying the style id as a negative value for this parameter. Also, use the following constant to specify normal or the current style item. |
SID_NORMAL | 'Normal' style item. |
SID_CUR | Style item being currently edited. |
int type; | One of the following parameter types can be used: |
FONTINFO_UCBASE | The unicode base for the font |
FONTINFO_CHARSET | The character set for the font |
FONTINFO_PICT_WIDTH | The picture width in twips assuming that the FontId represents a picture. |
FONTINFO_PICT_HEIGHT | The picture height in twips assuming that the FontId represents a picture. |
FONTINFO_ULINE_COLOR | The color of the underline bar. |
FONTINFO_AUX_ID | The auxiliary id for the font. |
FONTINFO_FLAGS | Font flags. The following font flags are available: FFLAG_AUTO_SPELL: Font with wave underline. |
FONTINFO_FRAME_TYPE | The frame type for a floating picture assuming that the FontId represents a picture.. Please refer to the TerSetPictFrame2 function for a list of PFRAME_ constants. |
FONTINFO_FRAME_ID | The frame id associated with a font assuming that the FontId represents a floating picture. |
FONTINFO_OFFSET | The character offset (twips) from the baseline. |
FONTINFO_IS_PICT | Returns 1 if the FontId represents a picture, otherwise returns 0. |
FONTINFO_IS_OCX | Returns 1 if the FontId represents an ocx object, otherwise returns 0. |
FONTINFO_IS_OLE | Returns 1 if the FontId represents an ole object, otherwise returns 0. |
FONTINFO_FIELD | Field id for the font. |
FONTINFO_INS_REV_ID | Reviewer id for inserted text. |
FONTINFO_DEL_REV_ID | Reviewer id for deleted text. |
FONTINFO_SIZE | Retrieve the font size in twips. |
FONTINFO_STYLE | Return the font styles. Please refer to the GetFontInfo function for the definition of style constants. |
FONTINFO_TEXT_COLOR | Font text color |
FONTINFO_BK_COLOR | Font text background color |
FONTINFO_WLINE_COLOR | The color of the wave line under the text. |
Return Value: This function returns the value of the requested parameter. It returns -1 to indicate an error condition.