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
richTextBoxIDInt
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.).
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.). Use for status displays showing current line, line-based navigation, or syntax highlighting. If text is selected, returns the line containing the selection start. Combines caret position query with line number conversion in a single operation.