05-21-2017, 01:29 PM
I came-up with the following solution, which it works :
1. In messages 3
case NM_CUSTOMDRAW
ret DT_Ret(hDlg sub.TvCustomdraw(+nh 171))
where 171 is the color code in this example
2. Passing the color paramater in TvCustomdraw :
#sub TvCustomdraw
function# NMTVCUSTOMDRAW*cd int'col
out cd.nmcd.dwDrawStage
out col
sel cd.nmcd.dwDrawStage
case CDDS_PREPAINT ret CDRF_NOTIFYITEMDRAW ;;yes, notify me to draw items
case CDDS_ITEMPREPAINT
cd.clrText=col
I wonder whether there exists a simpler way to pass the color parameter into TvCustomdraw.
Thanks for any advice.
1. In messages 3
case NM_CUSTOMDRAW
ret DT_Ret(hDlg sub.TvCustomdraw(+nh 171))
where 171 is the color code in this example
2. Passing the color paramater in TvCustomdraw :
#sub TvCustomdraw
function# NMTVCUSTOMDRAW*cd int'col
out cd.nmcd.dwDrawStage
out col
sel cd.nmcd.dwDrawStage
case CDDS_PREPAINT ret CDRF_NOTIFYITEMDRAW ;;yes, notify me to draw items
case CDDS_ITEMPREPAINT
cd.clrText=col
I wonder whether there exists a simpler way to pass the color parameter into TvCustomdraw.
Thanks for any advice.