菜鸟学习笔记。好记性不如烂笔头。老外的码,找不到作者链接了,只好归原创了,毕竟调试了嘛。:)
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls,CommCtrl, Themes;
type
TForm1 = class(TForm)
ListView1: TListView;
procedure ListView1CustomDrawSubItem(Sender: TCustomListView;
Item: TListItem; SubItem: Integer; State: TCustomDrawState;
var DefaultDraw: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
const
StatusColumnIndex = 2;
implementation
{$R *.dfm}
procedure DrawStatus(DC: HDC; R: TRect; State: TCustomDrawState; Font: TFont;
const Txt: String; Progress: Single);
var