G
Guest
Hello
I am trying to change the color of my CTreeCtrl item text by using the Custom Draw event handler. While I see the correct progression of messages while debugging, I never see the color of the text change. I have included my event handler code...can anyone see a problem? Is there some setting in the resource file that I have to tweak
void CCallLibraryView::OnNMCustomdrawTree1(NMHDR *pNMHDR, LRESULT *pResult
LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR)
switch (pNMCD->dwDrawStage
case CDDS_PREPAINT
*pResult = CDRF_NOTIFYITEMDRAW
break
case CDDS_ITEMPREPAINT
LPNMTVCUSTOMDRAW pCustomDraw = (LPNMTVCUSTOMDRAW) pNMCD->lItemlParam
pCustomDraw->clrText = RGB(255,0,0)
*pResult = CDRF_NEWFONT
break
default
*pResult = CDRF_DODEFAULT
break
Thanks In Advance
John
I am trying to change the color of my CTreeCtrl item text by using the Custom Draw event handler. While I see the correct progression of messages while debugging, I never see the color of the text change. I have included my event handler code...can anyone see a problem? Is there some setting in the resource file that I have to tweak
void CCallLibraryView::OnNMCustomdrawTree1(NMHDR *pNMHDR, LRESULT *pResult
LPNMCUSTOMDRAW pNMCD = reinterpret_cast<LPNMCUSTOMDRAW>(pNMHDR)
switch (pNMCD->dwDrawStage
case CDDS_PREPAINT
*pResult = CDRF_NOTIFYITEMDRAW
break
case CDDS_ITEMPREPAINT
LPNMTVCUSTOMDRAW pCustomDraw = (LPNMTVCUSTOMDRAW) pNMCD->lItemlParam
pCustomDraw->clrText = RGB(255,0,0)
*pResult = CDRF_NEWFONT
break
default
*pResult = CDRF_DODEFAULT
break
Thanks In Advance
John