 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Lynn Morrison Guest
|
Posted: Thu Apr 29, 2004 5:11 am Post subject: TImageList: how to do this? |
|
|
How do I take a bunch of images I have in a TImageList and place them into a
resource?
I don't want to lose the order because of menus and whatnot already being
setup to use certain indexes of it. Also, I wish to create another list to
load dynamically which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?
Anyone have any opinions or options on this?
Thanks,
Lynn
|
|
| Back to top |
|
 |
JD Guest
|
Posted: Thu Apr 29, 2004 6:34 am Post subject: Re: TImageList: how to do this? |
|
|
"Lynn Morrison" <Cranky (AT) __whisp (DOT) com> wrote:
| Quote: | How do I take a bunch of images I have in a TImageList and
place them into a resource?
|
If they're bitmaps, you can use the Image Editor that come
with BCB but it only supports 16bit (colors) bitmaps.
| Quote: | I don't want to lose the order because of menus and what not
already being setup to use certain indexes of it.
|
As you'll see, the order matters little since you reference
the image by name. I supose you could try something like:
String rcName;
for( int x = 0; x < Count; ++x )
{
rcName.sprintf("IMAGE%02d", x );
// load the resource "IMAGE01" using rcName.c_str()
}
| Quote: | Also, I wish to create another list to load dynamically
which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?
|
To be clear, whether in a resource file or embedded TImageList,
they both endup as part of the executable.
Look at this link:
http://www.bcbdev.com/faqs/faq52.htm
and related link:
http://www.bcbdev.com/faqs/faq54.htm
~ JD
|
|
| Back to top |
|
 |
Lynn Morrison Guest
|
Posted: Sat May 01, 2004 2:45 am Post subject: Re: TImageList: how to do this? |
|
|
Ok, thanks for the info...
Lynn
"JD" <nospam (AT) nospam (DOT) com> wrote
| Quote: |
"Lynn Morrison" <Cranky (AT) __whisp (DOT) com> wrote:
How do I take a bunch of images I have in a TImageList and
place them into a resource?
If they're bitmaps, you can use the Image Editor that come
with BCB but it only supports 16bit (colors) bitmaps.
I don't want to lose the order because of menus and what not
already being setup to use certain indexes of it.
As you'll see, the order matters little since you reference
the image by name. I supose you could try something like:
String rcName;
for( int x = 0; x < Count; ++x )
{
rcName.sprintf("IMAGE%02d", x );
// load the resource "IMAGE01" using rcName.c_str()
}
Also, I wish to create another list to load dynamically
which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?
To be clear, whether in a resource file or embedded TImageList,
they both endup as part of the executable.
Look at this link:
http://www.bcbdev.com/faqs/faq52.htm
and related link:
http://www.bcbdev.com/faqs/faq54.htm
~ JD
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|