|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Adrian M
|
Oct 20, 2007 - 3:15 PM
|
Hi,
I’m trying reduce the size of the prof-uis dll used in my project by uncommenting the #define’s in the profuis.h file and I came across a couple of errors in the prof-uis source code - when I disable the ribbon (__EXT_MFC_NO_RIBBON_BAR), I got errors first in ExtPaintManager that CExtComboBox was missing, so I added this include to the file. Then, I got a link error and it turns out that the following line around line count 5025: #if (!defined __EXT_MFC_NO_RIBBON_BAR)
removes the definition for the method CExtCmdIcon * CExtBarCheckBoxButton::GetIconPtr() which triggers the link error.
I’ll let you know if I find others.
Thanks,
Adrian
|
|
Technical Support
|
Oct 22, 2007 - 12:29 PM
|
You can also reduce the library size by excluding Office2007 paint managers. To do this, just comment out the following line in the Prof-UIS\Include\Resources\resource.rc resource file: #include "Res2007\\Res2007.rc" The last thing you can do is to exclude unneeded international language resources. Just uncomment all the lines for the languages you do not need #define __EXT_MFC_NO_RESOURCES_xxxxxxx Yes, you can use the static linking. You can read more about this in How to link statically with Prof-UIS?
|
|
Adrian M
|
Oct 22, 2007 - 3:07 PM
|
Thanks - removing resources made a big difference in the final size.
One issue though - I couldn’t remvoe the line #include "Res2007\\Res2007.rc" as I use the "luna blue" theme. So what I did in res2007.rc I commented all lines referring to resources other than luna blue, and that worked well. What I would suggest though to make this easier is to provde #define _EXT... for 2007 resources with finer granularity - so we can disable various themes individually.
BTW, the initial size of the dll (release) was over 8 Mb and now is about 2.5 Mb.
After all the changes I made in the prof-uis source, I’m now reluctant to install the new 2.81 version. Fixing the issues I mentioned in your source code would make it much easier for me (and probably others) to upgrade to a new release.
Thanks,
Adrian
|
|
Adrian M
|
Oct 20, 2007 - 3:55 PM
|
Even after removing a lot of the functionality, the ProfUIS280m-RDE.dll is still around 6Mb. Is there anything else I can do to make even smaller?
Would linking with the static version of prof-uis make it smaller yet? I’m thinking that the linker will remove all unused code. My application uses a number of basic features of prof-uis, so a lot of the advanced stuff is not needed. But because my main window is in a dll, I know there could be some runtime issues when linking with the static version of prof-uis and dynamic version of MFC.
Adrian
|
|
Adrian M
|
Oct 20, 2007 - 3:33 PM
|
Another problem: I tried to remove the dynamic bar site, but that caused an error in the NC Frame classes (there is a specialized template
template < > class CExtNCW < CExtDynamicMDIChildWnd > : public CExtDynamicMDIChildWnd , public CExtNcFrameImpl
that causes the error. IMO, this should be ifdef-ed, as I may want to use the NC classes (which is my case), but without support for dunamic bars.
Adrian
|
|
Adrian M
|
Oct 20, 2007 - 3:17 PM
|
BTW, for the second error, I moved the #if(!defined....) line after the GetIconPtr function defintion and that fixed the error.
|
|