Gets the current caret (cursor) position in a rich text box.
Takes richTextBoxID (Int).
Returns cpMin (caret position at selection start) on success, 0 if rich text box not found.
BGI GUI
Parameters & Returns
Parameters
richTextBoxIDInt
Returns
Int
Quick Summary
Gets the current caret (cursor) position in a rich text box.
Takes richTextBoxID (Int).
Returns cpMin (caret position at selection start) on success, 0 if rich text box not found.
Technical Exegesis...
Gets the current caret (cursor) position in a rich text box control. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL message to retrieve CHARRANGE structure. Returns cpMin (caret position at selection start) on success, 0 if rich text box not found.
This function returns the 0-based character index where the text caret is located. When no text is selected, caret position equals both selection start and end.
Gets the current caret (cursor) position in a rich text box control. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL message to retrieve CHARRANGE structure. Returns cpMin (caret position at selection start) on success, 0 if rich text box not found.
This function returns the 0-based character index where the text caret is located. When no text is selected, caret position equals both selection start and end. When text is selected, caret position is at the selection start (cpMin), regardless of drag direction. Use for positioning operations, finding insertion point, or tracking cursor location. Same as bgiGetRichTextSelectionStart. To determine if text is selected, compare with bgiGetRichTextSelectionEnd (different values = text selected).