Warning: file_get_contents() [function.file-get-contents]: SSL: 远程主机强迫关闭了一个现有的连接。 in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884

Warning: file_get_contents(https://whois.pconline.com.cn/jsLabel.jsp?ip=127.0.0.1) [function.file-get-contents]: failed to open stream: HTTP request failed! in D:\wwwroot\huidong\wwwroot\function.inc.php on line 884
EasyX 从 ICON 资源文件中读取图像的注意事项 - huidong

huidong

首页 | 会员登录 | 关于争取 2022 寒假做出汇东网 Ver3.0.0 !
搜索文章


https://qa.codebus.cn/question/2278


转载村长的话:


在 VS2022 里面,导入图标以后,图标所属的分类 Icon 是一个特殊的分类,不能直接当字符串使用。

用文本编辑的方式修改 Resource.rc,找到图标资源部分:

IDI_ICON1               ICON                    "icon.ico"
IDB_PNG1                PNG                     "test.png"

将 ICON 修改为 MYICON(或其它非预定义的分类):

IDI_ICON1               MYICON                  "icon.ico"
IDB_PNG1                PNG                     "test.png"

然后再用:

loadimage(&imgICON, L"MYICON", MAKEINTRESOURCE(IDI_ICON1));

就可以成功加载图标资源。





返回首页


Copyright (C) 2018-2024 huidong