w98 losing resources by assigning font.name in tlistview customdrawsubitem
- From: HanslH <nospam@xxxxxxxxxxxxx>
- Date: Sat, 24 Sep 2005 11:08:22 +0200
delphi 4
Some days ago i posted a message here about losing recources in w98 while there seems to be hardly
any problem in win xp.
I tracked the problem down to the following:
In the customdrawsubitem event of a listview this code is executed:
if rapportmodus = rmDagomzet then begin
if (subitem = 9) then begin
if item.subitems[8] = 'R' then begin
font.color := clmaroon;
font.style := [fsbold];
end else if item.subitems[8] = 'P' then begin
brush.color := clblue;
font.color := clwhite;
end else if item.subitems[8] = 'R.' then begin
brush.color := clmaroon;
font.color := clwhite;
end;
end;
if (subitem = 10) then
font.name := 'wingdings'
else
font.name := 'ms sans serif';
end;
If I refresh te list the resources in w98 go down to 0% in about 6-7 times.
If I remove the last lines where the fontnames get assigned the problem is over.
What am I doing wrong and will it affect operation under win xp too, though less noticable?
.
- Prev by Date: Re: reading a opened file
- Next by Date: Re: Exit Edit Box on Form
- Previous by thread: Strings in file
- Next by thread: PLZ Simple Code To Record Wav File From Sound Card Mic Input Using MediaPlayer
- Index(es):