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
richTextBoxIDInt
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).
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). If text is selected from position 5 to 10, returns 10 (characters 5-9 are selected). Use with bgiGetRichTextSelectionStart to get the full selection range. Selection length = end - start. When user selects text backwards, cpMax is still the higher position.