更改列表控件的背景颜色 [英] to change the background color of list control
本文介绍了更改列表控件的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改列表控件的颜色并插入文本,我读到我们可以使用NM_CUSTOMDRAW更改颜色,以及如何使用它.它不在类向导(消息)中,请引导我
谢谢您
Hi,
How to change the colour of the list control and insert the text , i read we can change color using NM_CUSTOMDRAW,,, how to use it. It is not in the class wizard (messages),, pls guide me
thank you
推荐答案
看一下本文: ^ ]
在这里您将能够看到如何做:
take a look at this article: http://msdn.microsoft.com/en-us/library/8w156kh2(v=vs.80).aspx[^]
Here you will be able to see how to do it:
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
// Use the 3D button face color for the background.
COLORREF crBkColor = ::GetSysColor(COLOR_3DFACE);
pmyListCtrl->SetBkColor(crBkColor);
ASSERT(pmyListCtrl->GetBkColor() == crBkColor);
这应该对您有帮助. :thumbsup:
This should help you. :thumbsup:
这篇关于更改列表控件的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文