🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.lang.borland-delphi
4 messages
4 total messages Started by At Tue, 29 Apr 2003 08:10
ExtractIconEx
#2389
Author: At
Date: Tue, 29 Apr 2003 08:10
9 lines
1567 bytes
Hi!

I want to extract an icon from shell32.dll. (IconIndex = 72)
On WinXP, the 256 colored icon is loaded, on Win2000 and Win98, nothing is
loaded. The color depth on Win2000 and Win98 is higher than 256 colors.
Can You help me?

Best regards,
At
Re: ExtractIconEx
#2360
Author: J French
Date: Tue, 29 Apr 2003 09:54
23 lines
1983 bytes
On Tue, 29 Apr 2003 08:10:36 GMT, "At" <attila40@hotmail.com> wrote:

>Hi!
>
>I want to extract an icon from shell32.dll. (IconIndex = 72)
>On WinXP, the 256 colored icon is loaded, on Win2000 and Win98, nothing is
>loaded. The color depth on Win2000 and Win98 is higher than 256 colors.
>Can You help me?

If you do :-

Hnd := ExtractIconEx( 'shell32.dll', -1, P1, P2, 1 );

Then Hnd returns the number of icons in the file

In my Win95 I get 72 returned
- which means that there are 0 to 71 icons

The documentation states that Hnd should return the handle to the
Icon, this seems wrong - 
Hnd := ExtractIconEx( 'shell32.dll', 71, P1, P2, 1 );

Returns 2 - which is the number of icons returned
Re: ExtractIconEx
#2361
Author: At
Date: Tue, 29 Apr 2003 10:12
22 lines
1835 bytes
I've tried to load the icon by name with LoadImage:

hSmallIcon := LoadImage(hShell32, PAnsiChar('154'), IMAGE_BITMAP, 16, 16,
LR_DEFAULTCOLOR + LR_SHARED);

GetLastError returns ERROR_RESOURCE_TYPE_NOT_FOUND

Why?

"At" <attila40@hotmail.com> wrote in message
news:0sqra.70241$v62.765084@news.chello.at...
> Hi!
>
> I want to extract an icon from shell32.dll. (IconIndex = 72)
> On WinXP, the 256 colored icon is loaded, on Win2000 and Win98, nothing is
> loaded. The color depth on Win2000 and Win98 is higher than 256 colors.
> Can You help me?
>
> Best regards,
> At
>
>
Re: ExtractIconEx
#2362
Author: Maarten Wiltink
Date: Thu, 01 May 2003 12:24
16 lines
1745 bytes
At wrote in message ...
>I've tried to load the icon by name with LoadImage:
>
>hSmallIcon := LoadImage(hShell32, PAnsiChar('154'), IMAGE_BITMAP, 16, 16,
>LR_DEFAULTCOLOR + LR_SHARED);
>
>GetLastError returns ERROR_RESOURCE_TYPE_NOT_FOUND. Why?


Just guessing: because it's not an IMAGE_BITMAP, it's an IMAGE_ICON?

Icons are not simple bitmaps, they are explicitly masked so portions
of it can be made invisible.

Groetjes,
Maarten Wiltink
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads