GuiLib1.5 中使用24位真彩图标
2008-04-16 11:11
141 查看
在使用 GuiLib 1.5 做界面时发现不能使用24位图标,于是尝试更改源代码,搜索SetImageList函数,改成下面那样就可以了。
void CGuiMiniTool::SetImageList(UINT nBitmapID, int cx, int nGrow, COLORREF crMask)
{
/*
CBitmap cbmp;
BITMAP bmp;
m_imgList.Create(nBitmapID,cx,nGrow,crMask);
cbmp.LoadBitmap(nBitmapID);
cbmp.GetBitmap(&bmp);
m_imgList.Add(&cbmp,crMask);
*/
m_imgList.Create(cx, cx, ILC_COLOR32 | ILC_MASK, 1, nGrow);
CBitmap bmp;
bmp.LoadBitmap(nBitmapID);
m_imgList.Add(&bmp, crMask); //白色为透明色
}
void CGuiMiniTool::SetImageList(UINT nBitmapID, int cx, int nGrow, COLORREF crMask)
{
/*
CBitmap cbmp;
BITMAP bmp;
m_imgList.Create(nBitmapID,cx,nGrow,crMask);
cbmp.LoadBitmap(nBitmapID);
cbmp.GetBitmap(&bmp);
m_imgList.Add(&cbmp,crMask);
*/
m_imgList.Create(cx, cx, ILC_COLOR32 | ILC_MASK, 1, nGrow);
CBitmap bmp;
bmp.LoadBitmap(nBitmapID);
m_imgList.Add(&bmp, crMask); //白色为透明色
}
相关文章推荐
- ListView 使用(电话本读取) - Android(1.5)
- 4.1 使用旋转和镜像工具制作图标 [Illustrator CC教程]
- 获取listview中的子元素view, 设置textview的图标:setCompoundDrawables使用, view.textView.getHeight()为0
- C# 图像处理:将图像(24位真彩)转为 8位灰度图像 采用了内存法,大大提高了效率
- JDK 1.5 特性使用实例2--Varargs
- EasyUI中 datagrid 插件 使用自定义的icon图标
- Android iconfont字体图标的使用
- 阿里字体图标使用方法
- 【Android 进阶】Iconfont 图标的使用以及自定义
- Java入门到精通——调错篇之Spring2.5使用AOP时报错only available on JDK 1.5 and higher
- 程序中使用图标
- JDK1.5中的线程池(java.util.concurrent.ThreadPoolExecutor)使用简介
- 字体图标的使用
- Ionic2像使用字体图标一样使用png图标等
- 在 Windows Forms 和 WPF 应用中使用 FontAwesome 图标
- 使用邮件图标生成器,有效防止垃圾邮件
- [HTML5-SVG]使用raphaeljs:代替css3绘制opera图标效果
- SharePoint开发中如何使用Visual Studio给你的Web Part添加图标
- [Phonegap+Sencha Touch] 移动开发7、Sencha Touch图标的使用与自定义
- Delph组件如何使用自己的图标(转)