Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » Customize with "MFC in a Static Library" Collapse All
Subject Author Date
Mathias Berchtold Mar 18, 2004 - 3:56 PM

Hello ...


Why is the customization "disabled" when linking with MFC in a static library? Is there a way around this limitation? We *have* to statically link the MFC library.


Thanks
-Mat
SmartFTP.com


From Prof-UIS.h


#if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__)


#define __EXT_MFC_NO_CUSTOMIZE


#endif // (defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__)

Technical Support Mar 19, 2004 - 8:53 AM

Dear Mathias,

At the moment you cannot directly use the Prof-UIS resource-dependent features in the applications statically linked with Prof-UIS.
But there is a workaround. Please follow the next steps:

Make the following changes below in the profuislib project:
1. Open the Prof-UIS workspace and make the profuislib project active;
2. Open the Prof-UIS.h file and comment the following lines:

// #if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__) 
//     #define __EXT_MFC_NO_CUSTOMIZE 
// #endif // (defined _AFXDLL || !defined __STATPROFUIS_WITH_DLLMFC__)
3. Add the following files to the project:
    ./Include/ExtCustomize.h
    ./Include/ExtIconEditDlg.h
    ./Src/ExtCustomize.cpp
    ./Src/ExtIconEditDlg.cpp
4. Select the required configuration and build the project.

Make some changes in your application:
1. Copy the ./profuisdll/profuisdll.rc file to the project’s directory.
2. Open profuisdll.rc in the text editor, find the VS_VERSION_INFO section and remove this entire section.
3. Copy the ./profuisdll/idd_ext_color_dlg.ico file to your project’s directory.
4. Copy the contents of the ./profuisdll/res directory to your ./res directory.
5. Add the #include "profuisdll.rc" line just after the comment "Add additional manually edited resources here..." in your application’s ./res/*.rc2 file. If you do not do this, the Prof-UIS assert at startup because it is trying to access resources that are not available.
6. Copy all constant definitions from the ./profuisdll/resource.h file to your resource.h