bgiGetRichTextCaretLine

Gets the line number where the caret (cursor) is located. Takes richTextBoxID (Int). Returns 0-based line number on success, 0 if rich text box not found.

BGI GUI

Parameters & Returns

Parameters

richTextBoxID Int

Returns

Int

Quick Summary

Gets the line number where the caret (cursor) is located. Takes richTextBoxID (Int). Returns 0-based line number on success, 0 if rich text box not found.

Technical Exegesis...

Gets the line number (0-based) where the caret is currently positioned in a rich text box. Searches gizmoMap for the rich text box ID. Sends EM_EXGETSEL to get CHARRANGE with caret position (cpMin). Sends EM_LINEFROMCHAR with caret position to convert character index to line number. Returns 0-based line number on success, 0 if rich text box not found.

This function returns which line the cursor is on. Line numbers are 0-based (first line = 0, second line = 1, etc.).

Example

Example.bam
; No example implemented yet