关于PE图标的继续讨论
来源:互联网 发布:网络故障修复软件 编辑:程序博客网 时间:2024/05/21 10:02
在本回复中,仅引用其中很关键的一段:
choosing an icon
when windows prepares to display an icon, a desktop shortcut for example, it must parse the .exe or .dll file and extract the appropriate icon image. this selection is a two step process starting with the selection of the appropriate rt_group_icon resource, and ending with the selection of the proper rt_icon image from that rt_group_icon.
which icon?
if an .exe or .dll file has only one rt_group_icon resource, the first step is trivial; windows simply uses that resource. however, if more than one such group resource exists in the file, windows must decide which one to use. windows nt simply chooses the first resource listed in the application's rc script. on the other hand, windows 95's algorithm is to choose the alphabetically first named group icon if one exists. if one such group resource does not exist, windows chooses the icon with the numerically lowest identifier. so, to be sure that a particular icon is used for an application, the developer should insure that both of the following criteria are met:
the icon is placed before all other icons in the rc file.
if the icon is named, its name is alphabetically before any other named icon, otherwise its resource identifier is numerically smaller than any other icon.
which image?
once an rt_group_icon is chosen, the individual icon image, or rt_icon resource, must be selected and extracted. again, if there exists only one rt_icon resource for the group in question, the choice is trivial. however, if multiple images are present in the group, the following selection rules are applied:
the image closest in size to the requested size is chosen.
if two or more images of that size are present, the one that matches the color depth of the display is chosen.
if none exactly match the color depth of the display, windows chooses the image with the greatest color depth without exceeding the color depth of the display.
if all the size-matched images exceed the color depth of the display, the one with the lowest color depth is chosen.
windows treats all color depths of 8 or more bpp as equal. for example, it is pointless to have a 16x16 256 color image and a 16x16 16bpp image in the same resource--windows will simply choose the first one it encounters.
when the display is in 8bpp mode, windows will prefer a 16 color icon over a 256 color icon, and will display all icons using the system default palette.
- 关于PE图标的继续讨论
- [继续讨论]关于Windows PE和.net assembly的加载
- 关于PE图标的一点点猜想
- 关于PE病毒编写的学习(四)——关于历遍磁盘的讨论
- 关于PE病毒编写的学习(四)——关于历遍磁盘的讨论
- 关于PE病毒编写的学习(四)——关于历遍磁盘的讨论
- 关于PE病毒编写的学习(4)——关于遍历磁盘的讨论
- 继续讨论Exception的处理
- 关于通过bindService启动的service,在unbindService后service是否继续运行的讨论
- 关于通过bindService启动的service,在unbindService后service是否继续运行的讨论
- 继续讨论Java里的closure
- 《IFeatureClass接口》的继续讨论 - [ArcEnine接口]
- Problem with svg icon 关于svg图标的问题的讨论---来自Nokia论坛
- 关于checkpoint的讨论
- 关于checkpoint的讨论
- 关于比赛的讨论
- 关于工作流的讨论
- 关于C的讨论
- [原blog文章]字符串比较代码
- [原blog文章]胡思乱想
- [讨论]关于文件搜索的探讨
- 关于PE图标的一点点猜想
- 月光下的飞虻
- 关于PE图标的继续讨论
- 一道C语言题
- [注册表使用]给一右键扩展的例子
- [原blog文章]关于代码规范的建议
- 样式表CSS 简明教程
- [原blog文章]qq无法即时收到信息
- 安全工具下载地点
- 打造最完美的BLOG系统
- 电子商城项目启动啦