How to display GIF image on MFC CDialog class?

Posted on 2004-10-05
Last Modified: 2008-01-09
I have to display GIF image(created by my company artist) on my MFC based application using MSDEV 6.0 . Can someone point me to the right directio on how to do it
Question by:amitguliani
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

jbajwa earned 34 total points
ID: 12232842
Please check out the article at the following URL


Assisted Solution

Santino_k earned 33 total points
ID: 12234656
Check this link -

It will help you display gif in MFc as well as ATL applications

Hope this helps


Assisted Solution

Ruskialt earned 33 total points
ID: 12234802
If the image is supposed to be a static part of your application (like an about box branding image or the like..) I would recommend converting to bmp (asair gif holds only 256 colors, so choose a bmp format likewise), and then add it to your resources.

You can insert 24 bit bmp in your dialogs too, even though it won't show in the resource editor since it supports only 256 colors. 24 bit images will give you way better anti aliasing (smoother, softer look).

I use irfanview because it loads fast, supports a bunch of formats, resizes and converts between formats very swift. This way no code is really needed to get the image shown (well, depends on your task ofcause...) only playing around with the resource editor.

Regards Ruskialt
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 12241094
Thanks for the URl. I will be trying them early next week.

My Gif will be having 2 frames so Ruskialt, so are you saying that I should display these 2 frames in a timer loop?


Expert Comment

ID: 12246039
Well, you must sum up pros and cons for both solutions, the animation ofcause makes things cumbersome. The links above are new to me, but seem better gif solutions than I've previously seen. The last one even supports animations. I would take an hour or two to investigate those links..

Good luck

Author Comment

ID: 12383211
I will be trying the above solutions this week and will accept the best answer.

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

734 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