bgiGetRichTextSelectionEnd

Gets the ending character position of the current text selection. Takes richTextBoxID (Int). Returns cpMax (selection end position) on success, 0 if rich text box not found.

BGI GUI

Parameters & Returns

Parameters

richTextBoxID Int

Returns

Int

Quick Summary

Gets the ending character position of the current text selection. Takes richTextBoxID (Int). Returns cpMax (selection end position) on success, 0 if rich text box not found.

Technical Exegesis...

Gets the ending character position of the current text selection in a rich text box. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL message to retrieve CHARRANGE structure. Returns cpMax (selection end position) on success, 0 if rich text box not found.

This function returns the 0-based character index where the selection ends (position after the last selected character). If no text is selected, returns the cursor position (same as start position).

Example

Example.bam
; No example implemented yet