展开全部
/overide
OnCustomDraw(NMHDR
*pHdr,
LRESULT
*pResult)
function.
void
JCListCtrl::OnCustomDraw(NMHDR
*pHdr,
LRESULT
*pResult)
{
LPNMLVCUSTOMDRAW
lplvcd
=
(LPNMLVCUSTOMDRAW)pHdr;
switch(lplvcd->nmcd.dwDrawStage)
{
case
CDDS_PREPAINT:
//
Request
prepaint
notifications
for
each
item.
*pResult
=
CDRF_NOTIFYITEMDRAW;
break;
case
CDDS_ITEMPREPAINT:
//
Requested
notification
if(lplvcd->nmcd.dwItemSpec
%
2)
{
lplvcd->clrText
=
RGB(0,
0,
0);
lplvcd->clrTextBk
=
RGB(
245,
210,
10
);
}
*pResult
=
CDRF_DODEFAULT;
break;
}
}
OnCustomDraw(NMHDR
*pHdr,
LRESULT
*pResult)
function.
void
JCListCtrl::OnCustomDraw(NMHDR
*pHdr,
LRESULT
*pResult)
{
LPNMLVCUSTOMDRAW
lplvcd
=
(LPNMLVCUSTOMDRAW)pHdr;
switch(lplvcd->nmcd.dwDrawStage)
{
case
CDDS_PREPAINT:
//
Request
prepaint
notifications
for
each
item.
*pResult
=
CDRF_NOTIFYITEMDRAW;
break;
case
CDDS_ITEMPREPAINT:
//
Requested
notification
if(lplvcd->nmcd.dwItemSpec
%
2)
{
lplvcd->clrText
=
RGB(0,
0,
0);
lplvcd->clrTextBk
=
RGB(
245,
210,
10
);
}
*pResult
=
CDRF_DODEFAULT;
break;
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
/overide OnCustomDraw(NMHDR *pHdr, LRESULT *pResult) function.
void JCListCtrl::OnCustomDraw(NMHDR *pHdr, LRESULT *pResult)
{
LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pHdr;
switch(lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
// Request prepaint notifications for each item.
*pResult = CDRF_NOTIFYITEMDRAW;
break;
case CDDS_ITEMPREPAINT: // Requested notification
if(lplvcd->nmcd.dwItemSpec % 2)
{
lplvcd->clrText = RGB(0, 0, 0);
lplvcd->clrTextBk = RGB( 245, 210, 10 );
}
*pResult = CDRF_DODEFAULT;
break;
}
}
void JCListCtrl::OnCustomDraw(NMHDR *pHdr, LRESULT *pResult)
{
LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pHdr;
switch(lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
// Request prepaint notifications for each item.
*pResult = CDRF_NOTIFYITEMDRAW;
break;
case CDDS_ITEMPREPAINT: // Requested notification
if(lplvcd->nmcd.dwItemSpec % 2)
{
lplvcd->clrText = RGB(0, 0, 0);
lplvcd->clrTextBk = RGB( 245, 210, 10 );
}
*pResult = CDRF_DODEFAULT;
break;
}
}
参考资料: CSDN
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询