1. icon embedding

Hi,

Anyone know how to embed a Windows icon in an .exe file?

TIA

-molasses

new topic     » topic index » view message » categorize

2. Re: icon embedding

EUPHORIA at LISTSERV.MUOHIO.EDU wrote:

> Hi,
>
> Anyone know how to embed a Windows icon in an .exe file?
>
> TIA
>
> -molasses

What do you mean? If you're using C, you'd probably use a resource file.
If you're using Euphoria, you'd probably have to make a constant for the
icon or use one of the programs that's available for putting files in an
Euphoria exe.
That would work if you wanted to display the icon once your program had
started - if you're wondering about making the program have an icon for
its file, I have no idea ho you'd do that.

--
Jeffrey Fielding
JJProg at cyberbury.net
http://members.tripod.com/~JJProg/

new topic     » goto parent     » topic index » view message » categorize

3. Re: icon embedding

"Molasses" wrote:

>Anyone know how to embed a Windows icon in an .exe file?

I'm assuming you mean a Euphoria .exe file.

The short answer is that you can't embed resources into Euphoria programs.
It *is* possible to create resources (like icons, cursors, dialog boxes, and
so on) with a resource editor, and ship the resource file along with your
application. You can then direct that the resources be loaded from that file
when your code runs. Obviously, this isn't "embedding" the icon into the
.exe.

The other route to take is to build the data structure from scratch from
within your program, instead of using a resource editor. You can then point
Windows to that chunk of memory. This is the approach that Win32Lib and
Llama take - it's a bit more work, but you end up with everything contained
within the executable. Again, not really "embedding", since you are
constructing the icon by hand, rather than sticking a pre-created resource
into your code somehow.

I haven't actually built any icons from scratch - it looks tedious, but
doable.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

4. Re: icon embedding

On Wed, 16 Jun 1999, David Cuny wrote:

] I haven't actually built any icons from scratch - it looks tedious, but
] doable.

As I have some experience in this field (icon creation), I'd like to say:

It's boring as hell, and you've got very little to show for the hour
you've sat at your terminal flicking little pixels on and off... :)

Nevertheless, it's an art form of sorts (IMHO), and in that respect, it's
the only art I think I could be really good at. S:)

Embedding icons, however, I haven't done. Would knowing the file format at
the icon position in Windows EXEs and DLLs help, and could something like
this just be snipped verbatim from another executable and bolted onto EXW?

Inspired thought:
Maybe RDS could add a 'slot' to EXW for _one_ icon, and also include a
shrouded program (like bind) that would read in a standard ".ico" file to
replace it. Possibly a warning given if EXW.EXE itself, rather than a
bound Windows EXE, is going to be changed...

Blatant Plug:
My icons can be seen on my Euphoria page. Also, the ".ex" and ".exw" disk
icons on the RDS Contributions page were done by me.

--
Carl R White -- Final Year Computer Science at the University of Bradford
E-mail........: cyrek- at -bigfoot.com -- Remove hyphens. Ta :)
URL...........: http://www.bigfoot.com/~cyrek/
Uncrackable...: "19.6A.23.38.52.73.45 25.31.1C 3C.53.44.39.58"

new topic     » goto parent     » topic index » view message » categorize

5. Re: icon embedding

On Tue, 15 Jun 1999 21:21:30 +1000, Molasses <molasses at ALPHALINK.COM.AU>
wrote:

>Anyone know how to embed a Windows icon in an .exe file?

You probably mean: How do I use icons in an Euphoria program?

It's very simple. Use "ExtractIcon" from shell32.dll. With this function you
can load icons from an ICO, EXE or DLL file. See the Win32 manual for
details.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu