CListCtrl的一些用法问答(FQA)
来源:互联网 发布:windows xp停止支持 编辑:程序博客网 时间:2024/06/10 12:34
Q:怎样将 CListCtrl 中的一行( one item)的背景或 Text Color 设为其它 color ?
A:
Using Custom Draw
The following code fragment is a portion of a WM_NOTIFY handler that illustrates how to handle custom draw notifications sent to a list-view control:
Hide Example
LPNMLISTVIEW
switch (pnm->hdr.code){
...
case NM_CUSTOMDRAW:
/* At this point, you can change the background colors for the item
and any subitems and return CDRF_NEWFONT. If the list-view control
is in report mode, you can simply return CDRF_NOTIFYSUBITEMREDRAW
to customize the item's subitems individually */
//