If you are trying to avoid a recompile, it makes sence to use a fixed
directory path and fixed names. To allow for skins or customization I
found that using the Directory name to identify the "skins" allowed for
easy maintence.
Embedding the images into a DLL or the application is possible, but the
unpack time is fairly high. Also you won't be able to change the
images without a recompile.
Fastest way to load the images is on demand. Instead of trying to load
them all at once in the beginning, load them when they are needed for
display.
I was able to accomplish fairly robust image management by creating a
DLL that stored all the images after they were loaded the first time
and then allowing object to use them as needed. If a needed image
wasn't loaded yet then it would load, however if the image was used
before it would be returned.
I have spent lots of time on this problem, and have seen and created
many different solutions. Best advice is to just experiment with what
you have and see which works best for you.
--
Norman Rericha
Sr. Software Architect
Embedded Systems
4Techwork.com
|