标签:io os ar for strong 文件 sp c on
以下是封装的一个函数:
procedure RichViewAddPicture(RichEdit: TRichViewEdit; const TagStr: string;
Stream: TMemoryStream; IsGif: Boolean);
var
LGraphic: TGraphic;
begin
if IsGif then
begin
LGraphic := TGIFImage.Create;
end else
begin
LGraphic := TBitmap.Create;
end;
Stream.Position := 0;
LGraphic.LoadFromStream(Stream);
RichEdit.InsertPicture(TagStr, LGraphic, rvvaBaseline);
end;
用这个增加图片后,Gif图片是静止不动的,还有两个地方需要设置
1. RichViewEdit的AnimationMode 必须设置成 rvaniOnFormat
2. 在RichViewEdit所在的Pas文件中,加入RVGifAnimate2007单元引用
标签:io os ar for strong 文件 sp c on
原文地址:http://www.cnblogs.com/textword/p/4010929.html