ClistCtrl
Hi,
how can i change the font in CLIstCtrl i need to change size and set to bold
with condition
i use this code in my app.
void CMyClass::OnNMCustomdrawMyList(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVCUSTOMDRAW* pCD = (NMLVCUSTOMDRAW*)pNMHDR;
DWORD_PTR row = pCD->nmcd.dwItemSpec;
if(row < 0 || row > m_List.GetItemCount() - 1)
{
if(pCD->nmcd.dwDrawStage == CDDS_PREPAINT)
{
*pResult = CDRF_NOTIFYSUBITEMDRAW;
}
else
{
*pResult = CDRF_DODEFAULT;
}
return;
}
switch(pCD->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
*pResult = CDRF_NOTIFYSUBITEMDRAW; break;
case CDDS_ITEMPREPAINT:
*pResult = CDRF_NOTIFYSUBITEMDRAW;
break;
case CDDS_ITEMPREPAINT|CDDS_SUBITEM:
{
if(st1)//true
{ for(st1 condition )
{
if(pCD->nmcd.dwItemSpec ==i[i])
{
pCD->clrText = RGB(0,0,94);
*pResult = CDRF_NEWFONT;
}
}
}
if(sc2)
{
for(sc2 condition)
{
if(pCD->nmcd.dwItemSpec == i[i] ) {
pCD->clrText = RGB(133,133,133); *pResult = CDRF_NEWFONT;
}
}
}
else
{
*pResult = CDRF_DODEFAULT;
}
break;
}
default:
*pResult = CDRF_DODEFAULT;
}
}
i need to add to this 2 condtion font size how can i do it
thanks for help