Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ListDialog : Change the color of particular lines
#4
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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)