03-21-2018, 12:05 AM
Hi Gintaras,
Hope all is well. I was wondering if there was a way to insert a string of RTF code: e.g.
and have it appear properly formatted as RTF in RichEditField.
I saw the function RichEditLoad but this seems to only take .rtf file of text already preformatted as RTF (e.g. using RTF editor like wordpad) and then loading as RTF formatted text. If I supply actual RTF code (like above) in .txt file, it inserts directly as simple text.
I am hoping to supply something like the exact string above and replace what is in RichEditField.
Or even better, getting RTF code out of RichEdit box using getsel with CF_RTF and then editing RTF tags slightly, then re-inserting to appear as RTF-formatted text.
I know that these will have to be in same exe/qm.
I think of this as similar to changing html formatting tag and then refreshing browser or reloading html file - but I understand that Win32/Winforms etc, is different than html!
Is this possible?
Thanks so much,
S
Hope all is well. I was wondering if there was a way to insert a string of RTF code: e.g.
Quote:{\rtf1 \ansi \deff0 {\fonttbl {\f0 Monotype Corsiva;}} \qc \f0 \fs120 \i \b Hello,\line World!}
and have it appear properly formatted as RTF in RichEditField.
I saw the function RichEditLoad but this seems to only take .rtf file of text already preformatted as RTF (e.g. using RTF editor like wordpad) and then loading as RTF formatted text. If I supply actual RTF code (like above) in .txt file, it inserts directly as simple text.
I am hoping to supply something like the exact string above and replace what is in RichEditField.
Or even better, getting RTF code out of RichEdit box using getsel with CF_RTF and then editing RTF tags slightly, then re-inserting to appear as RTF-formatted text.
I know that these will have to be in same exe/qm.
I think of this as similar to changing html formatting tag and then refreshing browser or reloading html file - but I understand that Win32/Winforms etc, is different than html!
Is this possible?
Thanks so much,
S