如何调整Windows图标叠加? [英] How to resize Windows Icon Overlay?

查看:201
本文介绍了如何调整Windows图标叠加?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一个图标叠加到我的文件, *。MYFILE ,但覆盖的大小是错误的。当图标显示大小为16x16,叠加覆盖的图标。

I made a icon overlay to my file, *.myfile, but the overlay size is wrong. When the icon shows in size 16x16, the overlay covers the icon.

如何更改叠加尺寸? ( IShellIconOverlayIdentifier

How can I change the overlay size? (IShellIconOverlayIdentifier)

推荐答案

您不能改变叠加尺寸。相反,使用多分辨率的图标文件,所有必要的尺寸可供选择。

You can't change the overlay size. Instead use a multi-resolution icon file where all necessary sizes are available.

对于一个很好的例子,看看到的source的TortoiseSVN 的。他们将只用一个图标文件,但如果你有一个适当的绘画工具打开它,你会看到这个文件包含不同的大小。

For a good example take a look into the source of TortoiseSVN. Their will be only one icon file used, but if you open it with an appropiate paint tool, you'll see that this file contains different sizes.

如果你在第一个方法看看吧,你会得到如下评论:

If you take a look right at the first method, you'll get the following comment:

壳牌调用IShellIconOverlayIdentifier :: GetOverlayInfo请求处理程序的图标叠加的
位置。图标叠加处理程序返回
包含覆盖图像文件的名称,它的$ b内指数$ b该文件。壳牌然后添加图标叠加系统图像列表。

"The Shell calls IShellIconOverlayIdentifier::GetOverlayInfo to request the location of the handler's icon overlay. The icon overlay handler returns the name of the file containing the overlay image, and its index within that file. The Shell then adds the icon overlay to the system image list."

您可以在129行,它看试图找出从注册表中所需要的文件的路径。通过浏览代码,你可以找到图标在这里颠覆。在线路165你可以看到,它需要的文件名从注册表,并将其写回到它的输出参数,也许魔术的标志,让窗口决定哪些大小应该从文件中采取的是 * pdwFlags = ISIOI_ICONFILE ;

You can see in line 129 that it tries to find out the path of the needed file from the registry. By browsing the code you can find the icons in subversion here. In line 165 you can see that it takes the filename from the registry and writes it back to its out parameters and maybe the magic flag to let windows decide which size should be taken from the file is *pdwFlags = ISIOI_ICONFILE;.

这篇关于如何调整Windows图标叠加?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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