GIF is displayed but not animated when using BCB6, why?

General TRichView support forum. Please post your questions here
Post Reply
lovelypp
Posts: 3
Joined: Mon Sep 24, 2007 7:12 am

GIF is displayed but not animated when using BCB6, why?

Post by lovelypp »

I use Anders Melander's TGifImage class and the trail version (1.9.38) of TRichView. My compiler is BCB 6. The AnimationMode property is set to rvaniOnFormat. My code is as following:

#include "RVGifAnimate.hpp"
#include "GIFImage.hpp"
...
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TGIFImage *Gif;

Gif = new TGIFImage;
Gif->LoadFromFile("d:\\gear.gif");
RichView1->AddPictureEx("", Gif, 0, rvvaMiddle);
RichView1->Format();
}

When press Button1, the image is displayed, but not animated. But when I click in the richview(which cause it to update), the image animate for one or two frames, but then stop again.

thanks!
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1) Assign RichView1->AnimationMode = rvaniOnFormat
2) Make sure that RVGifAnimate is linked to the project
(add the line
#pragma link "RVGifAnimate"
to one of your units)
lovelypp
Posts: 3
Joined: Mon Sep 24, 2007 7:12 am

thanks, resolved

Post by lovelypp »

I add the following line:
#pragma link "RVGifAnimate"

it's resolved. thanks great !
Post Reply