I need to get the column id will be drawn. This is my some of my code I try to get item id and column id to use ListView_GetItemText and set the correct color of the item to be drawn.
switch( ((LPNMLVCUSTOMDRAW)lParam)->nmcd.dwDrawStage){
case CDDS_PREPAINT:
return CDRF_NOTIFYITEMDRAW;
break;
case CDDS_ITEMPREPAINT:
{
LPNMLVCUSTOMDRAW customDraw = (LPNMLVCUSTOMDRAW)lParam;
int itemid = (customDraw->nmcd).dwItemSpec //this is item id
//column id is missing
return CDRF_NEWFONT;
break;
}
default: return CDRF_DODEFAULT;
}