[英]Is there a function like ExtractIconEx but for in-memory data instead of from a file
In the zserge/tray project, in the windows tray_update function , the ExtractIconEx
function is used to construct the icon handle ( HICON icon
).在zserge/tray项目中,在windows tray_update function中, ExtractIconEx
function构造HICON icon
句柄。 The function is passed tray->icon
as the first argument, which is a string that points to a .ico
file. function 作为第一个参数传递给tray->icon
,这是一个指向.ico
文件的字符串。
My question is, is there a function to get an icon handle using data from a variable (ie storing the binary of the .ico
file in an array)?我的问题是,是否有 function 使用来自变量的数据获取图标句柄(即将.ico
文件的二进制文件存储在数组中)?
Example of storing file data in array:将文件数据存储在数组中的示例:
unsigned char rawIconData[] = {
0x12, 0x34, // ...
};
There is CreateIconFromResourceEx
, but it will only give you one icon size (you can choose which) instead of returning an array of icons as ExtractIconEx
does.有CreateIconFromResourceEx
,但它只会给你一个图标大小(你可以选择哪个),而不是像ExtractIconEx
那样返回一组图标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.