bgiAppendRichText

Appends text to rich text box, applying current format if set. Takes richTextBoxID (Int) and text (String). Returns 1 on success, 0 if rich text box not found.

BGI GUI

Parameters & Returns

Parameters

richTextBoxID Int
text String

Returns

Int

Quick Summary

Appends text to rich text box, applying current format if set. Takes richTextBoxID (Int) and text (String). Returns 1 on success, 0 if rich text box not found.

Technical Exegesis...

Appends text to the end of a rich text box control, preserving existing content. Searches gizmoMap for the rich text box ID. Converts input string from UTF-8 to wide string. Moves caret to end with EM_SETSEL, records start position. Inserts text with EM_REPLACESEL (FALSE to disable undo). If format previously set via bgiSetRichTextFormat, applies stored CHARFORMATW to newly inserted text by selecting the new text range and sending EM_SETCHARFORMAT with SCF_SELECTION. Moves caret back to end.

Example

Example.bam
; No example implemented yet