| View previous topic :: View next topic |
| Author |
Message |
Sergey Tkachenko Site Admin
Joined: 27 Aug 2005 Posts: 6576
|
|
| Back to top |
|
 |
Sergey Tkachenko Site Admin
Joined: 27 Aug 2005 Posts: 6576
|
Posted: Tue Sep 29, 2009 9:16 am Post subject: |
|
|
I created a unit based on the code from the topic above.
http://www.trichview.com/support/files/saveolecontainertortf.zip
It contains the function
| Code: | function GetOleContainerRTFString(OleContainer: TOleContainer;
Image: TMetafile = nil): String; |
This function returns RTF representation of OleContainer for assigning to OutStr parameter of TRichView.OnSaveComponentToFile event:
| Code: | procedure TForm1.RichViewEdit1SaveComponentToFile(Sender: TCustomRichView;
Path: String; SaveMe: TPersistent; SaveFormat: TRVSaveFormat;
var OutStr: String);
begin
case SaveFormat of
...
rvsfRTF:
begin
if SaveMe is TOleContainer then
OutStr := GetOleContainerRTFString(TOleContainer(SaveMe))
...
end;
end;
end; |
The second parameter (Image) is optional. If assigned, this metafile will be used as an image representing this OleContainer. If not assigned, the function makes this image itself. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|