CTreeView,MFC中的图标背景色 [英] Icon background color in CTreeView,MFC

查看:266
本文介绍了CTreeView,MFC中的图标背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在拆分器窗口中有一个CTreeView.我想在运行时更改背景颜色(使用菜单).Iam使用

Hi,
I have a CTreeView in a splitter window.I want to change the background color at runtime(using a menu).Iam using

GetTreeCtrl().SetBkColor(...)

函数更改背景.现在的问题是与树项目关联的图标的背景颜色是不变,尽管我正在使用bacgroung进行更改,

function to change the background.Now the problem is the background color of icons associated with the tree items is not changing, Though i am changing the bacgroung using,

(GetTreeCtrl().GetImageList(TVIS_NORAMAL)->SetBkColor(...))

图标编辑器中图像的背景为透明.会有什么问题吗?有帮助吗?

The background of images in the icon editor is given as transparent.What will be the problem?Any help?

推荐答案

我认为当您将背景色设置为透明时,将使用默认的窗口颜色,在您的情况下为白色.要对其进行更改,可以使用CtlColor()上的SetBkColor将图像的背景色设置为所需的颜色.
I think when you give the background color as transparent, the default window color is used, in your case white, I persume. To change it, you can either set the bg color of image to the desired color using SetBkColor on CtlColor().


这篇关于CTreeView,MFC中的图标背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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