[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to play animated gifs ?

Posted on 2000-02-08
3
Medium Priority
?
228 Views
Last Modified: 2013-11-20
I would like to know how to play animated gifs within an MFC app ?
Thanks in advance.
0
Comment
Question by:trustit
  • 2
3 Comments
 

Accepted Solution

by:
UandI earned 400 total points
ID: 2500331
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.


0
 

Author Comment

by:trustit
ID: 2501346
Dear UanDi,

Thanks for your reply but it concerns AVI file. How can I play animated GIFs file ?
0
 

Expert Comment

by:UandI
ID: 2506758
I usually transform my animated gif to the avi format using gif construction set professional, free download at: http://www.mindworkshop.com/alchemy/gifcon.html

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 ftp.microsoft.com/developr/drg/Multimedia/Jumpstart/VfW11e/ODK/WINVIDEO
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!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month8 days, 21 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question