This function extracts plain text from the active text selection and copies it to a user-supplied memory buffer.
Parameter | Description |
---|---|
text_doc |
Handle of the associated text document instance. |
buffer |
A valid pointer to a user-supplied memory buffer to which the function will copy the plain text. |
max_buffer_len |
Size of the user-supplied buffer, i.e. the maximum number of bytes (not characters) that can be stored in the buffer. Applications can use the txTextGetSelectSize function to determine the total number of characters in all the active text selection(s). This makes it possible to easily calculate the required max_buffer_len value. |
buffer_format |
Specifies how the plain text is to be stored in the buffer. Can be one of the following: TX_BUFFER_FORMAT_1 1 /* 1 byte per character — for ANSI */ TX_BUFFER_FORMAT_2 2 /* 2 bytes per character — for UCS2 */ TX_BUFFER_FORMAT_3 3 /* 3 bytes per character */ TX_BUFFER_FORMAT_4 4 /* 4 bytes per character — for UCS4 */ These values have the following meaning:
|
If the function was successful, the return value is 1. Otherwise, the function returns 0.