Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting all formats of icons

Status
Not open for further replies.

shareman

Programmer
Aug 25, 2004
6
IL
We can extract icons from any file by using ExtractIconEx - but then we get only 16*16 and 32*32 formats. Also we can find and extract all existing formats from Win32 executable (exe, dll) by using resource functions. But theese functions (like LoadLibrary etc.) do not work with Win16 executable or files like icon libraries (.icl). Has anybody ever seen code snippet or example than allows to extrac all formats of icons from such files - Win16, .icl etc.
Thank you in advance
 
The program is good but has limitations. It only extracts 32x32, 256-color icons. Also, the extracted icons loose their transparency.

You should have a look at the code I posted in thread222-510876. The good thing about that code is that it extracts icons of all color formats, including semi-transparent true color icons introduced in Windows XP (perhaps).

Also, there is no size limitation. It supports all icon sizes. I have extracted icons as big as 96x96.

The largest icon I ever seen is the 4th icon in Windows XP shell32.dll, which is the "closed folder" icon. The size of its .ico file was 77 KB!

The bad thing about this code is that it only supports Win32 executables; including EXE, DLL, OCX etc. 16-bit libraries and icon libraries (.icl) are not supported.
 
Thanks guys! I know this way - there is realy no problem with Win32. So I proceed with my search.
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top