但是,如果我处理消息 NM_CUSTOMDRAW 并且在 CDDS_SUBITEM ||中CDDS_ITEMPREPAINT 更改 clrTextBk ,它看起来像这样:
//
if pnm^.code = NM_CUSTOMDRAW then
//
if not TblListViewFieldIsCreate then
begin
//
LPNMLVCD:=LPNMLVCUSTOMDRAW(lPrm);
//
case LPNMLVCD^.nmcd.dwDrawStage of
...
//
CDDS_SUBITEM or CDDS_ITEMPREPAINT:
begin
//
if ListViewItemSel = LPNMLVCD^.nmcd.dwItemSpec then
begin
//
if LPNMLVCD^.iSubItem = ListViewSubItemSel then
begin
//
LPNMLVCD^.clrText:=GetSysColor(COLOR_HIGHLIGHTTEXT);
//
LPNMLVCD^.clrTextBk:=GetSysColor(COLOR_HIGHLIGHT);
end
//
else
begin
//
LPNMLVCD^.clrText:=0;
//
LPNMLVCD^.clrTextBk:=$d8e9ec;
end;
//
Result:=CDRF_NEWFONT;
//
Exit;
end;
end;
end;
end;
我需要做些什么才能像标准一样绘制所选单元格?