trichview.support
Re: Saving RVF |
Author |
Message |
Yernar FoxTail |
Posted: 08/15/2002 13:13:11 Perhaps, here's what you need: var MyStream: TMemoryStream; RVList: TStringList; Str: string; begin MyStream:=TMemoryStream.Create; RVList:=TStringList.Create; try RVList.LoadFromFile('history.rvf'); Str:=RVList.Text; MyStream.Write(PChar(Str)^, Length(Str)); ShowMessage(IntToStr(MyStream.Size)); MyStream.Position:=0; RichViewEdit2.LoadRVFFromStream(MyStream); RichViewEdit2.Format; finally MyStream.Free; RVList.Free; end; >Hello all, >I have the following problem : if i try to save the contents of a >RichViewEdit to a RVF file. i can simply use RVE.SaveToRVF(). However, I >want to do something a bit more different -> to save the RVF to a stream, >and then save the stream as a string, and then save the string to a file F. >Then, instead of using RVE.LoadRVF(), i read the file F and insert the >contents in a stream S, and finally, I use LoadRVFFromStream(S). However, >this doesn't work. If I compare the contents of a string just converted from >RVE to Stream to String, it's a bit different from the string I obtain when >I open the file and Readln() from it. So, if I save it that way, some data >is lost. How is this solved, i.e. I do not use Readln() and Writeln(), or I >use a file diffrenet from TextFile.... > >Best regards, >Slavi |
Powered by ABC Amber Outlook Express Converter