How to play animated gifs ?

I would like to know how to play animated gifs within an MFC app ?
Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. Import the *.avi into your resources (Menu Insert, Resources ->import).
    Define a new category called AVI.
    The AVI-File must be in the RLE-Format, otherwise it won't play! You can         use a tool like VidEdit or else to convert your AVI into the right format.

2. Insert an Animate-Control into the dialog where you want to play your             AVI. (I suggest that you set the option autoplay to true)

3. Create a member variable for this control with class wizzard.
    (for example: m_cMyAnimation). It will be a variable of class CAnimateCtrl

4. Insert the following code in the dialogs initDialog() method:

    m_cMyAnimation.Open( IDR_ANIMATE );

    IDR_ANIMATE is the ressource id of your AVI.
    This will automatically open and start your animation.

That's it. Good luck.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trustitAuthor Commented:
Dear UanDi,

Thanks for your reply but it concerns AVI file. How can I play animated GIFs file ?
I usually transform my animated gif to the avi format using gif construction set professional, free download at:

After you've created the avi-file, you have to transform it to the rle avi format I mentioned before (I use Microsoft video edit for this). You can dowload this tool from
If you prefer other tool, there are quite a few available for free on the net.

If you don't want to do this the way I suggested, I'd recommend you to try to find a ocx-control or and active-x which can play animated gifs.

Good luck!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.