Thread overview
Icons
Feb 26, 2011
Joel Christensen
Feb 26, 2011
J Chapman
Feb 26, 2011
Joel Christensen
Feb 26, 2011
Joel Christensen
Feb 27, 2011
J Chapman
Feb 28, 2011
Joel Christensen
Feb 28, 2011
Joel Christensen
February 26, 2011
I noticed in windows with D you can use .res (eg. dmd main.d smile.res) files for icons any way. but how do you make icon .res files?
February 26, 2011
== Quote from Joel Christensen (joelcnz@gmail.com)'s article
> I noticed in windows with D you can use .res (eg. dmd main.d smile.res) files for icons any way. but how do you make icon .res files?

With a resource compiler. Digital Mars supplies one as part of its C++ utilities package: http://ftp.digitalmars.com/bup.zip.

Documentation is here: http://www.digitalmars.com/ctg/rcc.html
February 26, 2011
On 27-Feb-11 12:56 AM, J Chapman wrote:
> == Quote from Joel Christensen (joelcnz@gmail.com)'s article
>> I noticed in windows with D you can use .res (eg. dmd main.d smile.res)
>> files for icons any way. but how do you make icon .res files?
>
> With a resource compiler. Digital Mars supplies one as part of its C++
> utilities package: http://ftp.digitalmars.com/bup.zip.
>
> Documentation is here: http://www.digitalmars.com/ctg/rcc.html

Thanks Chapman. :-)
February 26, 2011
On 27-Feb-11 11:24 AM, Joel Christensen wrote:
> On 27-Feb-11 12:56 AM, J Chapman wrote:
>> == Quote from Joel Christensen (joelcnz@gmail.com)'s article
>>> I noticed in windows with D you can use .res (eg. dmd main.d smile.res)
>>> files for icons any way. but how do you make icon .res files?
>>
>> With a resource compiler. Digital Mars supplies one as part of its C++
>> utilities package: http://ftp.digitalmars.com/bup.zip.
>>
>> Documentation is here: http://www.digitalmars.com/ctg/rcc.html
>

Hmm. Can't seem to get it to work.
February 27, 2011
== Quote from Joel Christensen (joelcnz@gmail.com)'s article
> On 27-Feb-11 11:24 AM, Joel Christensen wrote:
> > On 27-Feb-11 12:56 AM, J Chapman wrote:
> >> == Quote from Joel Christensen (joelcnz@gmail.com)'s article
> >>> I noticed in windows with D you can use .res (eg. dmd main.d smile.res) files for icons any way. but how do you make icon .res files?
> >>
> >> With a resource compiler. Digital Mars supplies one as part of its C++ utilities package: http://ftp.digitalmars.com/bup.zip.
> >>
> >> Documentation is here: http://www.digitalmars.com/ctg/rcc.html
> >
> Hmm. Can't seem to get it to work.

In what way?

I just tried it, and it works (mostly).

Add this to your resource script (eg "icons.rc"), where "myicon.ico" is the
path to the icon:
0001 ICON "myicon.ico"

Compile with the following command:
c:\dm\bin\rcc icons.rc

Then add the resulting "icons.res" to the command line when building your app.

However, starting with Windows Vista, there's a new .ico format based on
PNG, which Digital Mars's rcc doesn't recognise. In which case you'll get
the following antiquated error:
"myicon.ico doesn't contain a valid Windows 3.0 icon resource

So if you see that error, use Microsoft's resource compiler (rc.exe) from
the Windows SDK instead.
February 28, 2011
Thanks, Chapman :-), I followed your instructions and they worked.
February 28, 2011
I got it working with the DAllegro (Allegro 4.2) game library as well!