是IShellItemImageFactory接口,用于获取Vista / 7 shell缩略图,坏了吗? [英] Is the IShellItemImageFactory interface, used for getting Vista/7 shell thumbnails, broken?

查看:661
本文介绍了是IShellItemImageFactory接口,用于获取Vista / 7 shell缩略图,坏了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 IShellItemImageFactory 以检索文件的shell缩略图。根据MSDN文档,如果我传入256x256的SIZE结构,它应该使用256x256位图填充HBITMAP参数,如果我使用SIIGBF_RESIZETOFIT标志,它应该将较小的缩略图调整为256x256。它不。相反,结果是一个256x256的位图,在中间绘制一个小图标。

I want to use IShellItemImageFactory to retrieve the shell thumbnail of files. According to the MSDN docs, if I pass in a SIZE struct of 256x256, it should populate the HBITMAP parameter with a 256x256 bitmap, and if I use the SIIGBF_RESIZETOFIT flag, it should resize smaller thumbnails to 256x256. It doesn't. Instead, the result is a 256x256 bitmap with a small icon drawn in the middle.

好吧,也许这不是什么SIIGBF_RESIZETOFIT应该做的。但是,根据我的理解,我应该能够使用SIIGBF_BIGGERSIZEOK和指定一个小尺寸(说1x1),它应该返回实际的缩略图大小。它不。我总是得到任何我传递的大小。

Okay, maybe that's just not what SIIGBF_RESIZETOFIT is supposed to do. But then, as I understand it, I should be able to use SIIGBF_BIGGERSIZEOK and specify a tiny size (say 1x1) and it should return the actual thumbnail size instead. It doesn't. I always get whatever size I pass in.

我使用这个API不正确,还是只是坏了?网上似乎有很少的例子。有几个讨论帖有人建议API被打破。如果它确实坏了,我如何确定一个给定的壳项目是否有缩略图?

Am I using this API incorrectly, or is it just broken? There seem to be very few examples on the web. A few discussion posts have people suggesting the API is broken. If it is indeed broken, how can I determine if a given shell item has a thumbnail? That way, I can use this method to get thumbnails and extract the icon otherwise.

推荐答案

您见过 http://mattolenik.spaces.live.com/?_c11_BlogPart_BlogPart= blogview& _c = BlogPart& partqs = cat%3D.NET

我试过了,似乎运作良好

I've tried it and it seems to work well

这篇关于是IShellItemImageFactory接口,用于获取Vista / 7 shell缩略图,坏了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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