/*先将图片用<Gen_bin.exe>转换成*.txt文件,再重命名为*.h文件*/
/*将生成的*.h文档包含*/
#include "gif.h"
/*此为GIF播放类,需要在工程中添加CGIFShow.h和CGIFShow.cpp两个文档*/
#include "CGIFShow.h"
/*此用于加载GIF动画*/
CFile fp;
fp.Open(GIFPATH,CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
fp.Write((char *)record_gif,sizeof(record_gif));
fp.Close();
pGIFInst = new CGIFShow(::GetDC(m_hWnd));
CString GifFileName;
GifFileName = GIFPATH;
if(pGIFInst->Load(GifFileName))
{
RECT rcClient;
GetClientRect(&rcClient);
pGIFInst->SetPosition(60,30);
}
/*此用于控制动画的播放*/
pGIFInst->Play();//开始
pGIFInst->Pause(true);//暂停
pGIFInst->Pause(false);//继续
pGIFInst->Stop();//停止
浙公网安备 33010602011771号