pdis^.rcItem, GetSysColorBrush(COLOR_HIGHLIGHT));
SetTextColor(pdis^.hDC, GetsysColor(COLOR_HIGHLIGHTTEXT));
end
else begin
FillRect(pdis^.hDC, pdis^.rcItem, GetSysColorBrush(COLOR_WINDOW));
SetTextColor(pdis^.hDC, GetSysColor(COLOR_WINDOWTEXT));
end;
SetBkMode(pdis^.hDC, TRANSPARENT);
if csidl<>555 then begin // csidl
SHGetSpecialFolderLocation(AWnd, csidl, pidl);
str := GetNameFromPIDL(pidl);
GetSmallIconFromPIDL(pidl, himl, iImage);
ImageList_Draw(himl, iImage, pdis^.hDC, pdis^.rcItem.Left+2, pdis^.rcItem.Top+2, ILD_TRANSPARENT);
Inc(pdis^.rcItem.Left, 20);
DrawText(pdis^.hdc, PChar(str), -1, pdis^.rcItem, DT_SINGLELINE or DT_LEFT or DT_VCENTER);
CoTaskMemFree(pidl);
end
else begin // normal path
SetLength(str, MAX_PATH);
SendMessage(hCombo, CB_GETLBTEXT, pdis^.itemID, LongInt(PChar(str)));
str := PChar(str);
GetSmallIconFromPath(str, himl, iImage);
ImageList_Draw(himl, iImage, pdis^.hDC, pdis^.rcItem.Left+2, pdis^.rcItem.Top+2, ILD_TRANSPARENT);
Inc(pdis^.rcItem.Left, 20);
DrawText(pdis^.hDC, PChar(str), -1, pdis^.rcItem, DT_SINGLELINE or DT_LEFT or DT_VCENTER);
end;
end;
end;
上一页 [1] [2] [3] [4] |