How do you change the text color of a Clistctrl item (report view)?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You need to handle the NM_CUSTOMDRAW message and change the text color in that handler.
For an example, see this article.
回答2:
I would implement a CMFCListCtrl
derived class and override the OnGetCellTextColor
method. Things are much easier this way than with custom draws.