trichview.com

trichview.support




Re: copying items


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/13/2002 19:28:35


Hello,


If you copied items in the Clipboard/stream/file, you can insert them

multiple times without copying again (if you use streams, do not forget to

set Stream->Position = 0 before each insertion.


There are two main methods of insertion:


1) RVE->InsertRVFFromStreamEd()

Inserts data in the position of caret. This method does not require calling

Format() - it quickly reformats the document itself (quickly - because it

reformats only affected paragraphs). This method requires formatted document

when called, and leaves it formatted after.

This method can be undone.


2) RVE->InsertRVFFromStream()

Inserts data in the specified position. It does not require formatted

document when it is called - so you can use it multiple times and call

Format after:


RVE->ClearUndo(); // InsertRVFFromStream does not update undo buffers

Stream->Position = 0;

RVE->InsertRVFFromStream(...)

Stream->Position = 0;

RVE->InsertRVFFromStream(...)

Stream->Position = 0;

RVE->InsertRVFFromStream(...)

Stream->Position = 0;

RVE->InsertRVFFromStream(...)

RVE->Format();



> Hello,

>

> I copy+paste some textitems in a richview. After that I want to copy+paste

> a part of these inserted textitems a second time. I made it with

SetSelectionBounds(),SaveRVFToStream()

> and InsertRVFFromStream(). That needs to use RVE-Format() after every

insert

> function.

>

> Is there an other way to do this multiple copy+paste without using

RVE->Format()?

> I ask that, because my code is not the fastest yet and I think a lot of

the

> time needs the RVE->Format(). I'd like to call RVE->Format() only one time

> in the end of my algorithm.

>

> I thought something like:

"SaveRVFToStream(myStream,firstItem,lastItem);InsertRVFFromStream(myStream,a

fterItemNo);"

>

>

> thanks

> Steffen

>





Powered by ABC Amber Outlook Express Converter