TE Edit Control Win32 / Win64 Help
Product page

TerGetParaInfo

Get paragraph attributes.

BOOL TerGetParaInfo(hWnd, LineNo, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags);
BOOL TerGetParaInfo2(hWnd, LineNo, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags, Aux1Id, BkColor);
BOOL TerGetParaInfo3(hWnd, LineNo, IsStyleItem, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags, Aux1Id, BkColor);
BOOL TerGetParaInfo4(hWnd, LineNo, IsStyleItem, LeftIndent, RightIndent, FirstIndent, TabId, StyleId, AuxId, Shading, pflags, SpaceBefore, SpaceAfter, SpaceBetween, flags, Aux1Id, BkColor, LineSpacing);
HWND hWnd;The handle of the window to be accessed
long LineNo;Line number to retrieve the paragraph information. To specify a para id instead of a line number, specify a negative value.
BOOL IsStyleItem;This parameter is applicable to the TerGetParaInfo3 function only. It allows you to retrieve the paragraph information for a style item. When this flag is set to TRUE, the LineNo parameter should be used to pass a style id to retrieve its information. You can also set the LineNo to SID_CUR to get the paragraph information about the style being currently edited.
LPINT LeftIndent;Left indentation (in twips).
LPINT RigthIndent;Right indentation (in twips).
LPINT FirstIndent;Indentation for the first line (in twips).
LPINT TabId;Tab id.
LPINT StyleId;Paragraph Style id.
LPINT AuxId;An application specified id.
LPINT shading;Shading amount: a value from 0 (no shading) to 10000 (darkest shading).
UINT far *pflags;Additional paragraph flags:
PFLAG_WIDOW:Widow/orphan control
PFLAG_PAGE_BREAK:Page break before the paragraph
LPINT SpaceBefore;Space before the paragraph (in twips).
LPINT SpaceAfter;Space after the paragraph (in twips).
LPINT SpaceBetween;Space between the paragraph lines (in twips).
UINT far *flags;Paragraph attribute flags. Please refer to the 'SetTerParaFmt' function for a list of paragraph attribute ids.
DWORD far *Aux1Id;Another application specified id.
COLORREF far *BkColor;Paragraph background color.
LPINT LineSpacing;Extra line spacing in percentage

Return Value: This function returns a TRUE value when successful. Otherwise it returns FALSE.

TerGetParaParam

Get additional paragraph properties

int  TerGetParaParam (hWnd, LineNo, IsStyleItem, type)
HWND hWnd;The handle of the window to be accessed
long LineNo;Line number to retrieve the paragraph information. To specify a para id instead of a line number, specify a negative value.
BOOL IsStyleItem;This parameter allows you to retrieve the paragraph information for a style item. When this flag is set to TRUE, the LineNo parameter should be used to pass a style id to retrieve its information. You can also set the LineNo to SID_CUR to get the paragraph information about the style being currently edited.
int typeParameter type to retrieve.
PARAINFO_TEXT_FLOWParagraph text flow. Please refer to the TerSetParaTextFlow function for the list of text flow constants.
PARAINFO_BORDER_COLORParagraph border color.
PARAINFO_BK_COLORParagraph background color.

Return Value: This function returns the value of the requested parameter. It returns PARAINFO_ERROR to indicate an error condition.