Loads RTF (Rich Text Format) file into rich text box with formatting.
Takes richTextBoxID (Int) and filepath (String).
Returns 0 if file open fails.
BGI GUI
Parameters & Returns
Parameters
richTextBoxIDInt
filepathString
Returns
Int
Quick Summary
Loads RTF (Rich Text Format) file into rich text box with formatting.
Takes richTextBoxID (Int) and filepath (String).
Returns 0 if file open fails.
Technical Exegesis...
Loads an RTF (Rich Text Format) file into a rich text box, preserving all formatting. Searches gizmoMap for the rich text box ID. Converts filepath from UTF-8 to wide string. Opens file with CreateFileW (GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING). Returns 0 if file open fails. Creates EDITSTREAM structure with file handle and RTFLoadCallback function pointer. Sends EM_STREAMIN message with SF_RTF flag to stream RTF content. Closes file handle.
Loads an RTF (Rich Text Format) file into a rich text box, preserving all formatting. Searches gizmoMap for the rich text box ID. Converts filepath from UTF-8 to wide string. Opens file with CreateFileW (GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING). Returns 0 if file open fails. Creates EDITSTREAM structure with file handle and RTFLoadCallback function pointer. Sends EM_STREAMIN message with SF_RTF flag to stream RTF content. Closes file handle. Returns 1 on success, 0 if rich text box not found or file open failed.
This function loads RTF files with full formatting preservation (bold, italic, colors, fonts, sizes, etc.). RTF is a rich text format supporting formatted documents. Use for loading saved documents, templates, or pre-formatted content. Replaces all existing content. RTFLoadCallback uses ReadFile to stream file data. Supports relative and absolute file paths. File must be valid RTF format - invalid files may display garbled text or partial content.