Gets the starting character position of the current text selection.
Takes richTextBoxID (Int).
Returns cpMin (selection start position) on success, 0 if rich text box not found.
BGI GUI
Parameters & Returns
Parameters
richTextBoxIDInt
Returns
Int
Quick Summary
Gets the starting character position of the current text selection.
Takes richTextBoxID (Int).
Returns cpMin (selection start position) on success, 0 if rich text box not found.
Technical Exegesis...
Gets the starting 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 cpMin (selection start position) on success, 0 if rich text box not found.
This function returns the 0-based character index where the selection begins. If no text is selected, returns the cursor position (same as bgiGetRichTextCaretPosition). If text is selected from position 5 to 10, returns 5.
Gets the starting 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 cpMin (selection start position) on success, 0 if rich text box not found.
This function returns the 0-based character index where the selection begins. If no text is selected, returns the cursor position (same as bgiGetRichTextCaretPosition). If text is selected from position 5 to 10, returns 5. Use with bgiGetRichTextSelectionEnd to get the full selection range. When user selects text backwards (right to left), cpMin is still the lower position, not the drag start.