Board index » cppbuilder » Component installing and component rebuilding

Component installing and component rebuilding

Hello all,

I asked the following in the cppbuilder.vcl forum however I was directed
to this forum concerning questions like this:

I've got a component install problem.
When I download a nice VCL from a website and install it in C++Builder
then the component appears with the default Borland bitmap (in fact it
uses the default dclusr35.res).

Just as I saw in C++Builder in 21 days this is determined by the USERES
statement in the project which is default dclusr35.res. However the same
book is also telling me that C++Builder automatically finds the .dcr
resource files for the bitmap. Therefore I should guess that when I
install a component which is downloaded from the web, and which includes
a .dcr file, that it automatically detects this bitmap. When I install
such a component then I copy all the files to the lib\obj directory.

So when copy all the necessary files to the \obj directory I should
asume that C++Builder should recognize the new bitmap. It doesn't.
When I manually edit the dlcusr35.cpp file and delete the USERES default
line then it also doesn't recognize it.
I also tried manually editing the dlcusr35.cpp and pasted the
USEREF="My_new_icon.dcr".
After lots of puzzling I finally got it working.

Is there a simple way to install the component with the bitmap which is
included (.dcr) in the distributed VCL file?

It also seemed to be at a moment that there is a difference when
installing a VCL which is written as .cpp or as .pas (referring to the
bitmap which is automatically found).

I also found out that if you try to rebuild a component, which I
sometimes have to do when I found out that the bitmap wasn't correct,
that some warnings and hints are generated which do not occur when you
install the component for the first time. Can anybody help me with this?

Does anybody have a explanation for this?

Henk.

 

Re:Component installing and component rebuilding


Hello all,

I've got a component install question;

When I install a web downloaded component and install it then the
component appears with the default C++Builder bitmap.
I read in "C++Builder in 21 days" that this is determined by the USERES
command in the dclusr35.bpk file which is default USERES = dclusr35.res.
However I also read that C++Builder auto detects a .dcr file if it is
included with the component.
Unfortunately that seems not to work at my side. I have to manually edit
the dclusr35.bpk file and change the statement into
USEREF="<my_special_bitmap>.dcr"; and rebuild the bpk file.

During recompiling I also automatically get some hints and warnings
displayed which I do not get when I compile for the first time???
Strange...
After that I get the default bitmap for my new installed component.

Does anybody know what I am doing wrong? Just as said in C++Builder 21
days by Kent Reisdorph on page 740: "...component on the Component
palette has the default C++Builder bitmap. WE CAN'T HAVE THAT !!!"

Thanks for any answer...

Bye, Henk.

Re:Component installing and component rebuilding


Add the line

#pragma resource "MyProjectName.dcr"

to the .cpp project file, and make sure the .dcr file is in the project
directory. Substitute for MyProjectname above your own .dcr file name. Then
build and install. The component bitmaps will then be taken from your .dcr
file.

Quote
Henk Medenblik wrote:
> Hello all,

> I've got a component install question;

> When I install a web downloaded component and install it then the
> component appears with the default C++Builder bitmap.
> I read in "C++Builder in 21 days" that this is determined by the USERES
> command in the dclusr35.bpk file which is default USERES = dclusr35.res.
> However I also read that C++Builder auto detects a .dcr file if it is
> included with the component.
> Unfortunately that seems not to work at my side. I have to manually edit
> the dclusr35.bpk file and change the statement into
> USEREF="<my_special_bitmap>.dcr"; and rebuild the bpk file.

> During recompiling I also automatically get some hints and warnings
> displayed which I do not get when I compile for the first time???
> Strange...
> After that I get the default bitmap for my new installed component.

> Does anybody know what I am doing wrong? Just as said in C++Builder 21
> days by Kent Reisdorph on page 740: "...component on the Component
> palette has the default C++Builder bitmap. WE CAN'T HAVE THAT !!!"

> Thanks for any answer...

> Bye, Henk.

Other Threads