newbie delphi usage question

This forum designated to discuss the Resource Builder
Post Reply
Posts: 3
Joined: Fri Jan 12, 2007 12:55 pm

newbie delphi usage question

Post by EdHrx »

I intend to use a resouce dll.
During a test I added an icon. Resource builder gave options for 16 x 16 ,
32x 32, 48 x 48 etc for the icon. Do I need to delete out all the options I dont want. If that is the case do I need to add the icon again to get another size,
Alternativley is their a way of calling to indicate the version Isize) of the icon I want.

The call I am making currently is
HICON = := LoadIcon(library_instance, icon_name);

best wishes Ed..

Site Admin
Posts: 2271
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Resource Builder includes these options for icon sizes just for speeding up and it is not obligatory to create all of them/ You just create icons with sizes you really need. If you need to add icon in another size just specify the size in Width and Heigh boxes.
When you use LoadIcon() API it loads icon with system icon size specified. This size could be detected using GetSystemMetric. If you need to load icon of specific size you can use LoadImage.
Cited from WinAPI help:
LoadIcon can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric values. Use the LoadImage function to load icons of other sizes.
Hope this helps.
Best regards,
Igor Sitikov.

Post Reply