Use CPictureEx class (could be found in www.codeguru.com) // To use CPictureEx, follow these steps: // - place a static control on your dialog (either a text or a bitmap) // - change its identifier to something else (e.g. IDC_MYPIC) // - associate a CStatic with it using ClassWizard // - in your dialog's header file replace CStatic with CPictureEx // (don't forget to #include "PictureEx.h" and add // PictureEx.h and PictureEx.cpp to your project) // - call one of the overloaded CPictureEx::Load() functions somewhere // (OnInitDialog is a good place to start) // - if the preceding Load() succeeded call Draw() //
先用画图板把gif图片另存为bmp格式就行了,然后再到vc里面去添加资源
// To use CPictureEx, follow these steps:
// - place a static control on your dialog (either a text or a bitmap)
// - change its identifier to something else (e.g. IDC_MYPIC)
// - associate a CStatic with it using ClassWizard
// - in your dialog's header file replace CStatic with CPictureEx
// (don't forget to #include "PictureEx.h" and add
// PictureEx.h and PictureEx.cpp to your project)
// - call one of the overloaded CPictureEx::Load() functions somewhere
// (OnInitDialog is a good place to start)
// - if the preceding Load() succeeded call Draw()
//