Board index » delphi » Loading/including Custom Cursors/Resources

Loading/including Custom Cursors/Resources

How do I get the linker to include the resources in my .RES file into the .EXE?

This may be a really dumb question, but after the hassle I've had trying
to do this I guess it's time to admit defeat and ask the experts!

I've tried the {$R *.RES} directive but when I look at the .EXE with Resource
Workshop there is no sign of the cursors or Icons in the .RES file!

Hopefully there is a simple fix (ie. something I should be doing) that will
get this working.  All I want to do is add a new cursor!

TIA for any help

Gary.

--
                                                     ____  /"//"/|__  __    
Gary Olliffe <ga...@parallax.co.uk>                 /   /|/ // / / / / /|  
Snail Mail : Parallax Solutions Ltd., Stone Court, / __/ / // / /> " <|/    
             Siskin Drive, Coventy, CV3 4FJ       /_/|_|/ // / /_/|/ /|    
Tel        : +44 (0)1203 514549                   |_|/./_//_/ /|_|/|_|/    
                                                       |_||_|/ Solutions Ltd

 

Re:Loading/including Custom Cursors/Resources


Quote
In article <31AAB585.4...@parallax.co.uk>, Gary Olliffe <ga...@parallax.co.uk> wrote:
>How do I get the linker to include the resources in my .RES file into the .EXE?
>I've tried the {$R *.RES} directive but when I look at the .EXE with Resource
>Workshop there is no sign of the cursors or Icons in the .RES file!

I believe you are interpreting *.RES to mean every .RES file, while I believe
its operational meaning is 'the .RES file with the name of this project,
whatever that might be'.  Include a directive such as {$R
MyVeryOwnCustomResource.RES} and you will probably be more pleased with the
results.  You will still want to have the $R *.RES directive.

cheers,
Tom

Thomas Ridgeway, Software Engineering -- ridge...@lbuddha.com
Little Buddha Studio: Multimedia Development Since 600 B.C.

Re:Loading/including Custom Cursors/Resources


: I believe you are interpreting *.RES to mean every .RES file, while I believe
: its operational meaning is 'the .RES file with the name of this project,
: whatever that might be'.  Include a directive such as {$R
: MyVeryOwnCustomResource.RES} and you will probably be more pleased with the
: results.  You will still want to have the $R *.RES directive.

I can't get my components to load the image I wanted. The only thing I know
of is what is listed on page 77 of the cwg (all 3 paragraphs).

I have a componen TAwk in awk_vcl.pas with a bitmap 24x24 in awk_vcl.dcr,
with the bitmap called TAwk. I just use a normal register - I've never heard
of $R and can't find it in the index of the cwg manual

I admit it, I'm a novice - what's the proper way to get an image on my
component?

                                                        - baylor
--

**************************************************************************
bwet...@uhc.com   baylor wetzel   BORN Client/Server consultant for...
United HealthCare - International Information Systems
disclaimer : My opinions are not those of the company

Re:Loading/including Custom Cursors/Resources


Quote
baylor wetzel wrote:

> : I believe you are interpreting *.RES to mean every .RES file, while I believe
> : its operational meaning is 'the .RES file with the name of this project,
> : whatever that might be'.  Include a directive such as {$R
> : MyVeryOwnCustomResource.RES} and you will probably be more pleased with the
> : results.  You will still want to have the $R *.RES directive.

> I can't get my components to load the image I wanted. The only thing I know
> of is what is listed on page 77 of the cwg (all 3 paragraphs).

> I have a componen TAwk in awk_vcl.pas with a bitmap 24x24 in awk_vcl.dcr,
> with the bitmap called TAwk. I just use a normal register - I've never heard
> of $R and can't find it in the index of the cwg manual

> I admit it, I'm a novice - what's the proper way to get an image on my
> component?

>                                                         - baylor

Hi,

Two things might be causing your problem:

1. the bitmap is named, "TAwk" instead of "TAWK" -- Delphi requires all caps!
2. you have a registration unit, say myreg.pas, that registers all of your components
   you must also have a myreg.res with the bitmap, TAWK in it since myreg.pas doesn't
   refer to tawk.dcr.

Best of Luck,

David S. Lee

Other Threads