We have developed an MDI application . It has a few screens (around 10 windows) and use MS flex list control. The problem is that the EXE size is huge . Around 24 MB. Any ideas on how to reduce the EXE size
Forgive me if I'm insulting your intelligence with these suggestions. I have no way of knowing the level of your expertise.
If you're not already doing so, choose "Use MFC in a Shared DLL" rather than "Use MFC in a Static Library" in your project settings for the main project and any dependent libraries.
However, you may need to include the dependent DLL's in your distribution to ensure that every client PC has at least the version of the DLL's that you require.
Also, as long as the code is well tested and stable, distribute only the Release rather than the Debug versions.
We noticed that when we changed the fontsize and color for highlighting (both used in in the MS flex grid control), the EXE size increased from 7 MB to 24 MB
Ah, I think what's happening is that you're using the "designer" to create your grid. When you do that, it saves LOTS of data to describe the grid, including perhaps the color of each cell, etc.
What I do is programmatically create the grid and make API calls to set the colors, fonts, etc. This removes the need to save data describing the grid in the resource file when it's compiled.
Unfortunately, this may take a lot of work on your part to change at this point, but I hope my explanation at least helps you to understand why it's happening. ;-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.