
Originally Posted by
S.S.Sudhakar
Hi,
Post your code snippet of header file and cpp file .
Basically u need to implement MPAlbAnimationObserver interface by deriving your view class from it .
//in header file
class CYourAppView : public CCoeControl,public MPAlbAnimationObserver
{
CPAlbImageViewerBasic* iViewer; //For Animated GIF
void Notify(TAnimationEvent aEvent);
}
//in cpp file
void CYourAppView :: Notify(TAnimationEvent aEvent)
{
return;
}
CYourAppView ::ConstructL(const TRect& aRect)
{
.......
iViewer = CPAlbImageViewerBasic::NewL(this,Rect());
iViewer->SetAnimationObserver(this,ETrue);//Put EFalse if u want to play gif only once
iViewer->SetContainerWindowL(*this);
TFileName GifName;
GifName.Copy(_L("C:\\Images\\birthday.gif"));,
TInt KError = iViewer->LoadImageL(GifName,EColor4K);
ActivateL();
}
CYourAppView ::Draw(const TRect& /*aRect*/) const
{
iViewer->PlayAnimationL();
}
to stop animation
use
//iViewer->StopAnimation();
BR,
Sudhakar