大家知道。。。winxp支持新的ico格式。。。

kingcom 2002-10-23 07:34:02
这些图标在XP资源管理器中有着柔和的阴影。。。

一用到toolbar上就乱了套...
但winzip用得就好好的。。。不知是怎么实现。。。

难道是用GDI+绘制上去?????????

有没有高手知道的。。。

找到答案另开贴给分!!!!!!
...全文
92 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
kingcom 2002-10-24
  • 打赏
  • 举报
回复
谢谢zyl910(910:分儿,我来了!)

今天翻了一下msdn..刚好也看到了你贴的那部分...等会试试...
fragmentfault 2002-10-24
  • 打赏
  • 举报
回复
呵呵,toolbar icons和icons是两回事
toolbar icon实际上就是bitmap,是没有alpha通道的
icons的阴影实际上是黑色加半透明,
如果直接画的话,alpha通道被丢弃,图像的边上肯定会出难看得黑边
让button,tool button支持winxp的themes,
msdn上有这样的文章的.

ps:toolicon一般都有两套的(xp中),一套是平常的颜色,另一套是鼠标移上后的颜色,前者更鲜亮些,后者层次更多些
zyl910 2002-10-23
  • 打赏
  • 举报
回复
可能是的
把flags设为ILC_COLOR32试试


ImageList_Create


HIMAGELIST ImageList_Create(
int cx,
int cy,
UINT flags,
int cInitial,
int cGrow
);

Creates a new image list.

Returns the handle to the image list if successful, or NULL otherwise.
cx
Width, in pixels, of each image.
cy
Height, in pixels, of each image.
flags
Set of bit flags that specify the type of image list to create. This parameter can be a combination of the following values, but it can include only one of the ILC_COLOR values. ILC_COLOR Use the default behavior if none of the other ILC_COLOR* flags is specified. Typically, the default is ILC_COLOR4, but for older display drivers, the default is ILC_COLORDDB.
ILC_COLOR4 Use a 4-bit (16-color) device-independent bitmap (DIB) section as the bitmap for the image list.
ILC_COLOR8 Use an 8-bit DIB section. The colors used for the color table are the same colors as the halftone palette.
ILC_COLOR16 Use a 16-bit (32/64k-color) DIB section.
ILC_COLOR24 Use a 24-bit DIB section.
ILC_COLOR32 Use a 32-bit DIB section.
ILC_COLORDDB Use a device-dependent bitmap.
ILC_MASK Use a mask. The image list contains two bitmaps, one of which is a monochrome bitmap used as a mask. If this value is not included, the image list contains only one bitmap.

cInitial
Number of images that the image list initially contains.
cGrow
Number of images by which the image list can grow when the system needs to make room for new images. This parameter represents the number of new images that the resized image list can contain.

--------------------------------------------------------------------

我为什么知道ico的文件格式?
是因为我以前想编一个图标编辑器
把ico、cur的文件格式弄懂了
但对于怎样显示32位ico,我只会纯图形学的方法——自己根据Alpha通道绘制ico
kingcom 2002-10-23
  • 打赏
  • 举报
回复
zyl910(910:分儿,我来了!) 能不能详细说一下...你对图形处理很牛的...

怎么样才能在我的程序中正确的应用这种新格式的图标??
系统有没有提供现成的API??

好像最新的vb.net或者c#.net 或者delphi7的工具条编辑器都不能支持这种图标吧??
imageList还能用来存取这种图标吗??


是不是都得用代码来实现??
zyl910 2002-10-23
  • 打赏
  • 举报
回复
跟以前的差不多
只不过位图数据是32位的(BGRA)

原来的GDI函数不会处理Alpha通道
haode 2002-10-23
  • 打赏
  • 举报
回复
gz

19,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 图形处理/算法
社区管理员
  • 图形处理/算法社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧