Board index » delphi » Problem with TImageList.GetIcon

Problem with TImageList.GetIcon

Hi,

I have the following problem with TImageList.GetIcon in Delphi 5:

I made an imagelist with 16x16 pixel icons. If I try to get one of these
icons into a TIcon, I get back a 32x32 icon. How can I get a correct 16x16
icon from the imagelist?

Here is my code:

var
    ico: TIcon;
begin
    ...
    ImageList1.GetIcon(1, ico);
    ...
end;

Thanks in advance

Jan

 

Re:Problem with TImageList.GetIcon


Hello Jan

Quote
> I made an imagelist with 16x16 pixel icons. If I try to get one of these
> icons into a TIcon, I get back a 32x32 icon. How can I get a correct 16x16
> icon from the imagelist?

Uses function ImageList_Draw or ImageList_DrawEx
and force the size of the icon to 16x16

Daniel

Projet sur le net, un diteur de page web 100% free :
http://freedani.free.fr/htmltool.php3

Other Threads