开发者

Changing the text Colour in a ListView Control ( Win32)

开发者 https://www.devze.com 2023-02-10 06:45 出处:网络
I have a List View Control that I have created with Win开发者_Python百科32 C++ I am adding sub items using ListView_SetItem

I have a List View Control that I have created with Win开发者_Python百科32 C++

I am adding sub items using ListView_SetItem

This just Text and the List View is in Report Mode. I want to change the colour of the text for a particular sub Item . Can I do this? How

Thanks


You'll need to use owner-draw for this sub item so that it uses different font properties than the rest of the list view.


It turns out you can do it using NM_CUSTOMDRAW but then you need to do a bunch of other stuff too

This article explains it really well http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=2890&av=110402 look for the section called ListView Colors

0

精彩评论

暂无评论...
验证码 换一张
取 消