Page 1 of 1

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

Posted: Mon Sep 24, 2007 7:20 am
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!

Posted: Mon Sep 24, 2007 1:29 pm
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)

thanks, resolved

Posted: Mon Sep 24, 2007 11:55 pm
by lovelypp
I add the following line:
#pragma link "RVGifAnimate"

it's resolved. thanks great !