SetTerParaFmt
Set paragraph styles
BOOL SetTerParaFmt(hWnd, styles, OnOff, repaint)
HWND hWnd; | Handle of the window to be accessed |
WORD styles: | Select paragraph styles: |
LEFT: | Left justified paragraph |
CENTER: | Centered paragraph |
RIGHT_JUSTIFY: | Right justified paragraph |
JUSTIFY: | Paragraph justified on both margins |
DOUBLE_SPACE: | Double spaced paragraph |
PARA_KEEP: | Keep the entire paragraph on the same page. |
PARA_KEEP_NEXT: | Keep the last line of the current paragraph and the first line of the next paragraph on the same page. |
PARA_BOX_TOP: | Apply top paragraph border |
PARA_BOX_BOT: | Apply bottom paragraph border |
PARA_BOX_BETWEEN | Draw lines between selected paragraphs. |
PARA_BOX_LEFT: | Apply left paragraph border |
PARA_BOX_RIGHT: | Apply left paragraph border |
PARA_BOX: | |
PARA_BOX_DOUBLE: | Double line paragraph border |
PARA_BOX_THICK: | Thick paragraph border |
To specify more than one styles, use the 'logical OR' (|) operator.
BOOL OnOff; | TRUE to set the styles, FALSE to reset the selected styles. |
BOOL repaint; | TRUE to refresh the window after this operation |
Description: Use this function to set or reset the specified styles.
When a text block is highlighted before calling this function, the selected lines are affected by this function. Otherwise, only the current paragraph is affected by this operation.
Return Value: This function returns TRUE if successful.
Example:
// center the current paragraph
SetTerParaFmt(hWnd,CENTER,TRUE,TRUE);