Z
zxp_ping
Unregistered / Unconfirmed
GUEST, unregistred user!
我现已找出,下面ListView的画代码上占了资源没有释放,导致程序,系统出错,请大家
指出是要如何释放,还是要如何做,。?
指出是要如何释放,还是要如何做,。?
代码:
procedure TfrmServer.ListComputerCustomDrawItem(Sender: TCustomListView;
Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if (ListComputer.ViewStyle = vsreport) then
begin
DefaultDraw:=false;
if (cdshot in state) and ((GetAsyncKeyState(VK_LBUTTON) and $8000)<>0) then
begin
ListComputer.Canvas.Font.Color:=clBlue;
ListComputer.Canvas.Brush.Color:=clDkGray;
end;
DefaultDraw:=true;
end;
end;