I’m trying to load the default HICON that explorer displays for:
- An open folder
- An exe that has no embedded default icon of its own. This can also be seen in ‘Add/Remove Programs’ or ‘Programs and Features’ as it’s called on Vista.
Do you know where these can be found? I think the folder icon might be in the resources of explorer.exe. But have no idea where the default application icon can be retrieved from.
And additionally, do you have any sample code that could load them into HICONs.
I really need this to work on multiple Windows OSs: 2000, XP, Vista, 2008
Thanks for the help so far. I’m on Vista and have looked through Shell32.dll. I don’t see an icon in there that looks the same as the default one displayed by an application in explorer. I could be missing it – there are 278 icons to look through – is it definitely in there, or is there some other location I should look?
I think they are in %windir%\system32\SHELL32.dll
Found some code in the internet, try if that works:
Edit: Windows has a lot more icons in the ‘moricons.dll’, but I think the file and folder icons should all be in the shell32.dll. Remind, that icons in Vista have different resolutions, up to 256×256, so the icon you are looking at a resolution 32×32 might look different then the full resolution version of the same icon.