TE Edit Control Win32 / Win64 Help
Product page

InsertRtfBuf

Insert a text buffer in the RTF format at the specified cursor location.

BOOL InsertRtfBuf(hWnd, buffer, length, line, column, repaint)
BOOL InsertRtfBufU(hWnd, UnicodeBuffer, length, line, column, repaint)
HWND hWnd;Handle of the window to be accessed
LPBYTE buffer;pointer to the buffer containing RTF data. This parameter is used by the InsertRtfBuf function only.
LPWORD UnicodeBuffer;pointer to the unicode buffer containing RTF data. This parameter is used by the InsertRtfBufU function only.
long length;length of the RTF buffer
long line;line location (base 0) where the text will be inserted. You can also set the 'line' parameter to -1 to insert the rtf document at the current cursor position. Or, set it to -2 to insert the rtf file at the end of the current document.
int column;column location (base 0) where the text will be inserted. This parameter is ignored when the 'line' parameter is set to -1 or -2.
BOOL repaint;TRUE to refresh the window after this operation

Description: This function is used to insert a buffer containing the text (in RTF format) into the specified TER window. The text is inserted at the specified line and column position.

To specify the location in terms of the line and column numbers, specify the line number in the 'line' argument and column number in the 'column' argument. To specify the absolute location, set the 'column' argument to -1, and set the 'line' argument to the absolute text location. To insert the text at the current cursor location, set the 'line' and 'col' arguments to -1. To append the text at the end of the document, set the 'line' to -2.

This function is available in the 'word wrap' mode only.

Return Value: This function returns TRUE if successful.