user186841
user186841

Reputation:

256x256 icons trouble again, or how to get TRUE icon size through IImageList

I get the System image list by calling SHGetImageList:

SHGetImageList(SHIL_LAST, IID_IImageList, (void**)&imList); 

I have a list of 256x256 images, but size of small icons which have not 256 version, have size 256 too. I need to get each icon with it's true size. How can i find out its size?

I'm get the size of an icon by using the method:

IImageList::GetIconSize

Ok. Now I know about IImageList::GetIconSize getting all icon's size equals 256x256. Then another question, how to know real image size?

p.s. Sorry for my english.

Upvotes: 3

Views: 1726

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 598039

An image list can only hold images of the same size. If you have a 256x256 image list, it will always return 256x256 images. To retreive images in other sizes, you need to access the other sized image lists that the Shell provides.

Upvotes: 1

Related Questions