bgiGetRichTextSelectionStart

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

richTextBoxID Int

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.

Example

Example.bam
; No example implemented yet