如何删除边框或更改CHeaderCtrl的边框颜色 [英] how to remove border or change border color of CHeaderCtrl

查看:186
本文介绍了如何删除边框或更改CHeaderCtrl的边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何删除边框或更改CHeaderCtrl的边框颜色?在我的情况下,CHeaderCtrl嵌入在CListCtrl中(我们没有从我们的代码中明确调用CHeaderCtrl :: create) 

我想从标题中删除此白色边框或想要更改边框颜色。

解决方案

您好Kumar1569,


感谢您在这里发帖。


>>如何删除边框或更改CHeaderCtrl的边框颜色?在我的情况下,CHeaderCtrl嵌入在CListCtrl中(我们没有从我们的代码中明确调用CHeaderCtrl :: create) 

我想从标题中删除此白色边框或想改变边框颜色。


对于这种情况,您可以从CHeaderCtrl派生自己的类,使用自定义绘图作为标题控件,并用标准CListCtrl标头替换你的。


以下是一些文件供你参考。


https://msdn.microsoft.com/library/windows/desktop/bb775238


https://www.codeproject.com/Articles/4447/How-to-skin-CListCtrl-including-scrollbars -and-col


希望这可以帮助你。


最好的问候,

Sera Yu



how to remove border or change border color of CHeaderCtrl ? In my case CHeaderCtrl is embedded in CListCtrl (we are not calling CHeaderCtrl::create explicitly from our code) 
I would like to remove this white border from header or would like to change the border color.

解决方案

Hi Kumar1569,

thanks for posting here.

>>how to remove border or change border color of CHeaderCtrl ? In my case CHeaderCtrl is embedded in CListCtrl (we are not calling CHeaderCtrl::create explicitly from our code) 
I would like to remove this white border from header or would like to change the border color.

For this case, you could derive your own class from CHeaderCtrl, use custom drawing for the header control and replace the standard CListCtrl header with yours.

Here are some documents for you as references.

https://msdn.microsoft.com/library/windows/desktop/bb775238

https://www.codeproject.com/Articles/4447/How-to-skin-CListCtrl-including-scrollbars-and-col

Hope this could be help of you.

Best Regards,
Sera Yu


这篇关于如何删除边框或更改CHeaderCtrl的边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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