bgiGetRichTextSelectedText

Gets the currently selected text as a plain string. Takes richTextBoxID (Int). Returns empty string if zero or negative.

BGI GUI

Parameters & Returns

Parameters

richTextBoxID Int

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.

Example

Example.bam
; No example implemented yet