You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在C++中更换wxStaticBitmap控件中的图片?

问题

更换wxStaticBitmap控件中的图片时,编译器报错提示类不存在名为SetBitmap的成员。

解决方案

使用以下代码实现图片更换:

wxImage bildo("./bildo.png", wxBITMAP_TYPE_PNG);

objekto->SetBitmap(wxBitmap(bildo));

其中objekto是wxStaticBitmap类的对象实例。

内容的提问来源于stack exchange,提问作者Utorko

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.23 09:54:18