| View previous topic :: View next topic |
| Author |
Message |
LarryJ Guest
|
Posted: Tue Mar 15, 2005 11:45 pm Post subject: ImageList in DLL |
|
|
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
|
Posted: Wed Mar 16, 2005 9:29 am Post subject: Re: ImageList in DLL |
|
|
"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
|
Posted: Thu Mar 17, 2005 8:36 pm Post subject: Re: ImageList in DLL |
|
|
"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 |
|
 |
|