Home > Back-end >  Memorystream content increase
Memorystream content increase

Time:10-27

Two memorystream m1, m2
If the increase of the content of the m2 in m1? There seems to be a problem, give advice or comments please, use the write
Under the code on the trouble under the masters teach you?

Btn1: add
 
Var, ms ms1: TMemoryStream;
The begin
Ms:=TMemoryStream. Create;
Ms1:=TMemoryStream. Create;
Ms. Position:=0;
Ms1. Position:=0;
RxRichEdit1. Lines. SaveToStream (ms);
RxRichEdit2. Lines. SaveToStream (ms1);
Ms. Size:=ms1. Size + Ms. Size;
Ms. Write (Ms1. ^ Memory, Ms1. Size);
Ms. Position:=0;
Rxrichedit3. Lines. Loadfromstream (ms);
Ms1. Free;
Ms. The Free;
end;

The result of this operation is: richedit3 read only the content of the ms, no ms1 I want both, warrior, please advise,

CodePudding user response:

RichEdit you play so? You change TMemo try;
RichEdit contains additional information, so can't show ms1

CodePudding user response:

This problem you so understand
Like this:
The first: & lt; HTML> Web1 & lt;/HTML>
The second: & lt; HTML> Web2 & lt;/HTML>
You put the two together into & lt; HTML> Web1 & lt;/HTML> Web2 & lt;/HTML>
The browser only first & lt; HTML> To & lt;/HTML> The content of the between,
Used RxRichEdit1, don't know whether there is a merge function, if there is no can merge,
Use TStringStream,
First delete the last character, second to delete the first character, and then together, finally write Rich3 is ok,

CodePudding user response:

Agree with the upstairs,,,,
  • Related