BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ImageList in DLL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
LarryJ
Guest





PostPosted: Tue Mar 15, 2005 11:45 pm    Post subject: ImageList in DLL Reply with quote



I have a large ImageList which adds 1.5meg to my program. I would like to
place the ImageList into a dll. Is it possible to transfer images from a
ImageList in a dll to a main program? Are there any program examples of
this?

Thanks
Larry


Back to top
JD
Guest





PostPosted: Wed Mar 16, 2005 9:29 am    Post subject: Re: ImageList in DLL Reply with quote




"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote:
Quote:

I have a large ImageList which adds 1.5meg to my program. I
would like to place the ImageList into a dll.

Be aware that the only benifit in doing this is that the exe
is smaller. It would still need to load the images into memory
at runtime.

Quote:
Is it possible to transfer images from a ImageList in a dll
to a main program?

Yes.

Quote:
Are there any program examples of this?

Yes. Google for:

"resource only dll" - 500K
"resource only dll c++" - 250K
"resource only dll c++ Borland" - 42K

If you're going to do this, I would advise seperating it into
several different dll's (if they can be grouped). You'd use
less memory at runtime and if you make changes, you don't have
to redistribute the entire set of images, but rather only the
dll(s) with the applied changes.

~ JD


Back to top
jB
Guest





PostPosted: Thu Mar 17, 2005 8:36 pm    Post subject: Re: ImageList in DLL Reply with quote




"LarryJ" <LarryJ33 (AT) ev1 (DOT) net> wrote

Quote:
I have a large ImageList which adds 1.5meg to my program. I would like to

Make a dll containing your resource (your ImageList) then load it
dynamically with LoadLibrary as and when you need the ImageList.

It is easy to make a function that returns just the desired image from the
ImageList.

Don't forget to free the library when not needed.

And it will reduce the size of the exe and simply coding.

jB



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.