15,979
社区成员
发帖
与我相关
我的任务
分享
INT_PTR CBatRegDlg::DialogProc( HWND hDlg,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
)
{
switch(uMsg)
{
case WM_NOTIFY:
{
LPNMHDR nmh = (LPNMHDR) lParam;
if(m_list == GetDlgItem(hDlg ,nmh->idFrom) && nmh->code == NM_CUSTOMDRAW)
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( lParam);
if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
{
return CDRF_NOTIFYITEMDRAW;//这里可以进来
}
else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
COLORREF rText; //这里从不进来
crText = RGB(255,0,0);
pLVCD->clrText = crText;
return CDRF_DODEFAULT;
}
return CDRF_DODEFAULT;
}
}
}
}