External vs. internal resources, bitmaps, .EXE size etc.
Posted on 2005-04-13
My application currently is an EXE and no external DLL's or anything, pretty simple as far as file structure is concerned. I do however have a bunch of external 24bit bitmap files that are used to build various parts of the user interface, and at this time, I have imported them all into my resource file and when the application compiles, the resulting .EXE is around 6MB.. This I know is going to grow as additional bitmaps are imported in to support UI that I have not yet put in place.
What are my alternatives? I load the images like this:
HINSTANCE hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(IDB_BITMAPX), RT_BITMAP);
hBmp = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(IDB_BITMAPX), IMAGE_BITMAP, 0, 0, 0);
Everything is working just fine, I'm just concerned that a large EXE might be problematic in the end? I could of course just load the files, and have the bitmaps existing along with the EXE, but I don't want straight-up bitmap files in the application folder, that could be edited or accidentally deleted and what not. Can they be packaged somehow into a DLL or an external resource file?
What do you suggest?