Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从wxWidgets中的资源文件加载动画GIF 我试图将动画GIF图像嵌入到WxWIDGISC++程序中。我可以从文件中加载图像并按如下方式显示: wxAnimationCtrl *an = new wxAnimationCtrl(this, wxID_ANY, wxAnimation(wxT("image.gif"), wxANIMATION_TYPE_ANY), wxPoint(150,0)); an->Play();_Image_Wxwidgets_Gif - Fatal编程技术网

从wxWidgets中的资源文件加载动画GIF 我试图将动画GIF图像嵌入到WxWIDGISC++程序中。我可以从文件中加载图像并按如下方式显示: wxAnimationCtrl *an = new wxAnimationCtrl(this, wxID_ANY, wxAnimation(wxT("image.gif"), wxANIMATION_TYPE_ANY), wxPoint(150,0)); an->Play();

从wxWidgets中的资源文件加载动画GIF 我试图将动画GIF图像嵌入到WxWIDGISC++程序中。我可以从文件中加载图像并按如下方式显示: wxAnimationCtrl *an = new wxAnimationCtrl(this, wxID_ANY, wxAnimation(wxT("image.gif"), wxANIMATION_TYPE_ANY), wxPoint(150,0)); an->Play();,image,wxwidgets,gif,Image,Wxwidgets,Gif,但我更希望将GIF图像保存在resource.rc文件中,以便将其编译到可执行文件中。我该怎么做?您可以尝试使用或函数,将GIF资源加载到内存中,然后获取并使用该输入流并将其传递给该函数; const void*data=NULL; 尺寸输出长度=0; //加载图标目录资源 if(!wxLoadUserResource(&data,&outLen,“ID\u WAIT”,RT\u RCDATA)) { wxLogError(u(“无法从资源加载图标”); } 其他的 { wxMemoryInpu

但我更希望将GIF图像保存在resource.rc文件中,以便将其编译到可执行文件中。我该怎么做?

您可以尝试使用或函数,将GIF资源加载到内存中,然后获取并使用该输入流并将其传递给该函数; const void*data=NULL; 尺寸输出长度=0; //加载图标目录资源 if(!wxLoadUserResource(&data,&outLen,“ID\u WAIT”,RT\u RCDATA)) { wxLogError(u(“无法从资源加载图标”); } 其他的 { wxMemoryInputStream流(数据,outLen); 如果(muani->Load(stream))muani->Play(); }