mfc - Changing filename color in Windows Explorer list view. -


i customize windows explorer.

one thing want changing file name's color in list view if file has special condition.
possible window subclassing? or need api hooking?
please let me know best way this.

thanks.

yes, can window subclassing:

add nm_customdraw handler clistctrl-derived class

void cmylist::oncustomdraw(nmhdr* pnmhdr, lresult* presult) {  lpnmlvcustomdraw lplvcd = (lpnmlvcustomdraw)pnmhdr;  switch (lplvcd->nmcd.dwdrawstage) { case cdds_prepaint:     *presult = cdrf_notifyitemdraw;     break;  case cdds_itemprepaint:     *presult = cdrf_notifysubitemdraw;     break;  case cdds_itemprepaint | cdds_subitem:     lplvcd->clrtext = **my_color**;     *presult = cdrf_dodefault; } 

}


Comments