Is there a way to scale a icon(extracted from an executable using ExtractIcon(...)) I don't want to clip part of the image, I just want to be able to shrink/expand it.
ok, but how do I determine the name of the resource to pass to LoadImage(), because I'm letting the user pick the program, soI wouldn't know at compile time
ok, that would work but I don't know the names of the icons. I'm loading them from user supplied executables. I've been loading them using ExtractIcon() which only needs the filename and the index of the icon to extract it, but I can't scale the icon with this function. Is there a function that can scale an icon that is loaded or load an icon based on its index and scale it
No! The icons with ExtractIcons are only exracted for the standard sizes. You have to load the executable as a ressource and enumerate them. Than you can extract the icons with LoadImage
icon scale
David Makin
You can load specific icon sizes from an icon via LoadImage
http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources/resourcereference/resourcefunctions/loadimage.asp
Michiel Wories - MSFT
1. There is a PickIconDlg
http://msdn.microsoft.com/library/default.asp url=/library/en-us/shellcc/platform/shell/reference/functions/pickicondlg.asp
2. There is a sample how to enumerate resources. You can enumerate the icons and just count down the icon count. Nothing else is done in ExtractIcon
http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/IntroductiontoResources/ResourceReference/ResourceFunctions/EnumResourceNames.asp
http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/WinUI/WindowsUserInterface/Resources/IntroductiontoResources/UsingResources.asp
Charley Vasconcelos
Nix_o_lay
Shadowsoul