trichview.com

trichview.support




Re: EAccess Violation in AppendRVFFromStream.


Return to index


Author

Message

Sergey Tkachenko

Posted: 06/22/2004 19:38:17


I tried, this code works for me (in my tests, src and dst were the same

component), and I called dst->Format() after this code).

Make sure that

- dst is linked to some TRVStyle;

and

- "Allow adding styles dynamically" is set both for src and dst (right click

them in C++Builder, choose "Settings" in the context menu,

set this option), or

- src and dst are linked to the same TRVStyle, or to TRVStyles with

compatible TextStyles, ParaStyles and ListStyles.




> following Source Code.

> Please make a correction.

>

> src and dst is TCustomRichView*

> -- C++Builder 6 Source Code ---

>

>   TRVTableItemInfo* table =

>     new TRVTableItemInfo( 1, 2, src->RVData );

>   table->Cells[0][0]->Clear();

>   table->Cells[0][0]->AddNLWTag("Name",0, 1, 0);

>   src->AddItem("",table);

>   src->Format();

>

>   TMemoryStream *Stream = new TMemoryStream();

>   src->SaveRVFToStream( Stream, false );

>   Stream->Position = 0;

>   dst->AppendRVFFromStream( Stream, 0 );

>   delete Stream;

>






Powered by ABC Amber Outlook Express Converter