I have RichViewEdit1 and RichViewEdit2 on a form. One contains some text with a background image (or a background color). The other contains a table with several cells.
I need to copy full RichViewEdit1 content into a table cell of RichViewEdit2.
I use this code:
Code: Select all
TStream* Stream = new TMemoryStream;
RichViewEdit1->SaveRVFToStream(Stream, false);
TRVLayoutInfo * ALayout = RichViewEdit1->CreateLayoutInfo();
TColor AColor = RichViewEdit1->Color;
TRVBackground *ABackGround = RichViewEdit1->Background;
Stream->Position = 0;
table->Cells[j][i]->LoadRVFFromStream(Stream, AColor, ABackGround, ALayout, NULL, NULL);
delete ALayout;
delete Stream;