[comp.windows.ms.programmer] Reading an ICON from an executable other than your own?

kilmer@hq.af.mil (03/18/91)

I was wondering if anyone had figured out how to read in an ICON from 
an .EXE file other than the one that you're executing.  Sort of like the
way the program manager change's an ICON in one of its groups to be any 
.EXE's ICON (so long as it has a resource attached to it). How is this done???
I've seen nothing on it in the windows DOC. I assume you would have to read
the file's header and from that find the offset to the resource section, and
then look for ICON resources? maybe...

I would really appreciate any replies.  

Thanks,

Richard Kilmer
--
-------------------------------------------------------------------------.
|  Richard Kilmer                           Kilmer@Opsnet-Pentagon.af.mil |
|  VAX Systems Analyst                            (AKA Kilmer@26.24.0.26) |
`-------------------------------------------------------------------------'

slh@wolf.cs.washington.edu (Scott Heyano) (03/19/91)

In article <kilmer.669302956@sysp1> kilmer@hq.af.mil writes:
|I was wondering if anyone had figured out how to read in an ICON from 
|an .EXE file other than the one that you're executing.  Sort of like the
|way the program manager change's an ICON in one of its groups to be any 
|.EXE's ICON (so long as it has a resource attached to it). How is this done???
|
	I haven't done this, but no one else seems to be replying:
	try using LoadIcon with the handle returned from LoadLibrary.
	As for trying to get the application icon w/o a name,
	just for the hell of it try sending a null string or null.
	If any of this works let me know.