BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Loading 64x64 TIcon

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
eshipman
Guest





PostPosted: Wed Nov 03, 2004 4:15 pm    Post subject: Loading 64x64 TIcon Reply with quote



I am able to load a TIcon with a 64x64 .ico. However, When trying to
load the same icon into a TImageList, with height/width set to 64/64,
I get the invalid image size error.

I set the Icon's height and width to 64/64 after creation.

Why would TIcon reset it's size to 32x32? I see FRequestedSize is set
to 64x64 but height/width is 32/32?

var
icon: TIcon;
begin
icon := TIcon.Create;
try
icon.Height := 64;
icon.Width := 64;
icon.handle := LoadImage(HInstance, 'LARGE_ICON', IMAGE_ICON,
64, 64, LR_LOADTRANSPARENT);
image1.Picture.Icon.Assign(icon);
// error happens here when TCustomImageList.CheckImage is called
imagelist1.AddIcon(icon);
finally
icon.Free;
end;
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.