AppendRVFFromStream/InsertRVFFromStream can't work

General TRichView support forum. Please post your questions here
Post Reply
noibird
Posts: 10
Joined: Thu Feb 24, 2011 5:14 pm

AppendRVFFromStream/InsertRVFFromStream can't work

Post by noibird »

Hi,
I have one richview(rv) and one richviewedit(rve), I want to copy content from richviewedit to richview. I code like this:

Code: Select all

TMemoryStream	*stream = new TMemoryStream();
rve->SaveRTFToStream(stream, false);
stream->Position = 0;
rv->InsertRVFFromStream(stream, rve->ItemCount); // or rv->AppendRVFFromStream(stream,-1);
Neither InsertRVFFromStream nor InsertRVFFromStream can't get any content in richview. So my question is how to copy content from richviewedit to richview?(include gif image)

Any help is appreciate!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Call rv->Format() at the end.
noibird
Posts: 10
Joined: Thu Feb 24, 2011 5:14 pm

Post by noibird »

sorry, it's my mistake, I have added rv->Format() at the end. But richview didn't display anything.
Is there some parameters I need to setup?
noibird
Posts: 10
Joined: Thu Feb 24, 2011 5:14 pm

Post by noibird »

I've fixed the problem. Change rve->SaveRTFToStream to rve->SaveRVFToStream...My mistake.

Thank you very much!
Post Reply