The problem that only one frame can be displayed in a gif file of the CPictureEx type

Source: Internet
Author: User

In order to give the software login interface an animation effect, it is decided to use GIF animation.

However, MFC does not have a standard control that can directly play GIF videos. The cpictureex class is found online. After installing a tutorial and writing the entire project, you can only display one frame of GIF. No animation effect. It turns out that the GIF resource is damaged after being added to the project using the wizard.

So I thought of dynamically loading GIF files in the program instead of adding them through a wizard.

Therefore, when loading a GIF image, use the bool cpictureex: load (lpctstr szfilename) function to specify the path and name of the loaded GIF file.

Instead of calling its reinstallation function bool cpictureex: load (lpctstr
Szresourcename, lpctstr szresourcetype );


Blog http://blog.csdn.net/shimachao/article/details/7895758 from shimachao

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.