Gets the currently selected text as a plain string.
Takes richTextBoxID (Int).
Returns empty string if zero or negative.
BGI GUI
Parameters & Returns
Parameters
richTextBoxIDInt
Returns
String
Quick Summary
Gets the currently selected text as a plain string.
Takes richTextBoxID (Int).
Returns empty string if zero or negative.
Technical Exegesis...
Retrieves the currently selected text from a rich text box as a plain string. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL to get CHARRANGE with selection range. Calculates length as cpMax - cpMin, returns empty string if zero or negative. Sends EM_GETSELTEXT to retrieve selected text into static buffer (max 65536 bytes). Returns selected text on success, empty string if no selection or rich text box not found.
This function extracts only the selected portion of text.
Retrieves the currently selected text from a rich text box as a plain string. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL to get CHARRANGE with selection range. Calculates length as cpMax - cpMin, returns empty string if zero or negative. Sends EM_GETSELTEXT to retrieve selected text into static buffer (max 65536 bytes). Returns selected text on success, empty string if no selection or rich text box not found.
This function extracts only the selected portion of text. Returns empty string when no text is selected (cpMin == cpMax). Formatting is stripped - returns plain text only. Result limited to 65536 bytes. Use for copy operations, text transformations on selection, or search/replace. Selection range determined by EM_EXGETSEL, text retrieval by EM_GETSELTEXT.