如何通过传递图像索引从cmfctoolbarimages获取图像信息? [英] How to get image information from cmfctoolbarimages by passing image index?

查看:260
本文介绍了如何通过传递图像索引从cmfctoolbarimages获取图像信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





如何通过传递图像索引从CMFCToolBarImages获取图像信息?



In CImageList使用,BOOL GetImageInfo(int nImage,IMAGEINFO * pImageInfo)我们可以获取图像信息。

同样,如何通过传递图像索引从CMFCToolBarImages获取图像信息?



我尝试了什么:



我探索但找不到任何东西。



提前致谢。

Hi,

How to get image information from CMFCToolBarImages by passing image index?

In CImageList by using, BOOL GetImageInfo(int nImage, IMAGEINFO* pImageInfo) we can get Image Information.
Likewise, How to get image information from CMFCToolBarImages by passing image index?

What I have tried:

I explored but couldn't find anything.

Thanks in advance.

推荐答案

使用 CMFCToolBarImages :: ExtractIcon

[ ^ ]获取 HICON 句柄。



将该句柄传递给 GetIconInfo功能(Windows) [ ^ ]获取图标信息。



然后可以将 HBITMAP hbmColor 成员传递给获取对象功能(Windows) [ ^ ]以获取图像的大小和颜色深度并访问位图。
Use CMFCToolBarImages::ExtractIcon
[^] to get the HICON handle.

Pass that handle to the GetIconInfo function (Windows)[^] to get the icon information.

The HBITMAP hbmColor member can then be passed to the GetObject function (Windows)[^] to get the size and colour depth of the image and access the bitmap.


这篇关于如何通过传递图像索引从cmfctoolbarimages获取图像信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆