bgiGetRichTextCaretPosition

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

richTextBoxID Int

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.

Example

Example.bam
; No example implemented yet