I'm using a virtual list view with custom drow.
I can change the color of each row, when I get CDDS_ITEMPREPAINT draw stage.
Now I want to paint each column (subitem) differently.
When I get CDDS_PREPAINT I return CDRF_NOTIFYITEMDRAW
Then I get CDDS_ITEMPREPAINT and I return CDRF_NOTIFYSUBITEMDRAW
Then I should get (CDDS_SUBITEM | CDDS_PREPAINT) but I never receive this message.
Why????
Posted on 2004-03-17 15:13:24 by greenant
After CDRF_NOTIFYSUBITEMDRAW you will get

CDDS_ITEMPREPAINT | CDDS_SUBITEM
Posted on 2004-03-18 00:04:48 by japheth
Ok. Now it works. There is an error in the msdn

If you returned CDRF_NOTIFYITEMDRAW in the previous step, you will then receive an NM_CUSTOMDRAW notification for each subitem with

dwDrawStage set to CDDS_SUBITEM | CDDS_PREPAINT. To change the font or color for that subitem, specify a new font or color and return

CDRF_NEWFONT.
Posted on 2004-03-18 00:54:41 by greenant
greenant:

I had some trouble in the NM_CUSTOMDRAW in the tree control as you had.

Will you post a little your list view code here?

Thanks!
Posted on 2004-03-25 21:24:16 by seasea