TE Edit Control Win32 / Win64 Help
Product page

SetTerCharStyle

Set or reset the character styles

BOOL SetTerCharStyle(hWnd, styles, OnOff, repaint)
HWND hWnd;The handle of the window to be accessed
UINT styles;Character style to set or reset:
BOLD:Bold
ULINE:Underline
ULINED:Double Underline
ULINE_DOTTEDDotted underline
ITALIC:Italic
STRIKE:Strikethrough
DOUBLE_STRIKEDouble strikethrough
SUPSCR:Superscript
SUBSCRSubscript
HIDDEN:Hidden Text
PROTECT:Protected Text
HLINK:Hyperlink
CAPS:All caps
SCAPS:Small Caps

To specify more than one styles, use the 'logical OR' (|) operator.

BOOL OnOff;TRUE to set the specified styles, FALSE to reset the specified styles.
BOOL repaint;TRUE to refresh the window after this operation

Description: This function is used to set or reset the give character styles. If a text block is highlighted, this operation is applicable to all characters in the block. Otherwise only the current character is affected.

Return Value: This function returns TRUE if successful.