1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
LRESULT ProcessCustomDraw (LPARAM lParam)
{
LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)lParam;
switch(lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
return CDRF_NOTIFYITEMDRAW;
case CDDS_ITEMPREPAINT:
return CDRF_NOTIFYSUBITEMDRAW;
case CDDS_SUBITEM | CDDS_ITEMPREPAINT:
{
if(lplvcd->iSubItem == 0)
{
//SelectObject(lplvcd->nmcd.dwItemSpec, lplvcd->nmcd.lItemlParam)
lplvcd->clrText = RGB(255,255,255);
lplvcd->clrTextBk = RGB(240,55,23);
return CDRF_NEWFONT;
}
else if(lplvcd->iSubItem == 1)
{
lplvcd->clrText = RGB(255,255,0);
lplvcd->clrTextBk = RGB(0,0,0);
return CDRF_NEWFONT;
}
else if(lplvcd->iSubItem == 2)
{
lplvcd->clrText = RGB(20,26,158);
lplvcd->clrTextBk = RGB(200,200,10);
return CDRF_NEWFONT;
}
else if(lplvcd->iSubItem == 3)
{
lplvcd->clrText = RGB(12,15,46);
lplvcd->clrTextBk = RGB(200,200,200);
return CDRF_NEWFONT;
}
else if(lplvcd->iSubItem == 4)
{
lplvcd->clrText = RGB(120,0,128);
lplvcd->clrTextBk = RGB(20,200,200);
return CDRF_NEWFONT;
}
else if(lplvcd->iSubItem == 5)
{
lplvcd->clrText = RGB(255,255,255);
lplvcd->clrTextBk = RGB(0,0,150);
return CDRF_NEWFONT;
}
}
break;
}
return CDRF_DODEFAULT;
}
| |