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 » Customization with statically linked library II. Collapse All
Subject Author Date
Suhai Gyorgy Oct 4, 2005 - 3:48 AM

Hi!


I’ve tried to do the steps described below to the LanguageSwitcher project.


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.hresources


I’ve also removed any resources that haven’t to do with English from profuisdll.rc as you recommended. And one more thing to add: in Prof-UIS.h there is one more #define by those lines, like this:

// #if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__) 
//     #define __EXT_MFC_NO_CUSTOMIZE 
//     #define __EXT_MFC_NO_DYNAMIC_BAR_SITE 
// #endif // (defined _AFXDLL || !defined __STATPROFUIS_WITH_DLLMFC__)

I compile the project with the same project-properties as I did with profuislib project, and it compiles without any warning. Still, when I try to run the application I get an unhandled exception. Checking the stack in debug I can see that the problem starts in CMainFrame::OnCreate() at CExtCustomizeSite::MenuInfoLoadAccelTable().


Could you give me any explanation for that?


Thank you: Chris

Technical Support Oct 4, 2005 - 1:25 PM

As we mentioned before, we stick to the idea of the statically linked application as a light-weight application that do not use resources. If you need resources and your application features a complex interface, why you don’t use Prof-UIS dynamically? We can add this issue to our To-Do list to implement such configurations later (to make this a standard option) -- we are just pressed for time. But if you do plan, for some reason, to use resources in your statically linked app, then please tell us how much time we have to help you with this issue.

Suhai Gyorgy Oct 5, 2005 - 1:38 AM

We need to use statically linked library because we don’t know in advance under what circumstances our application will be running. It has to be a stand-alone app. There might be a situation where your dll is already on the computer but it’s a different version which will make our app unable to run... But we really would like to use your features, the customization and the language-switching as well. By any chance will it be possible for us to build them in our app sometime this year or more like during this autumn? Thank you!

Technical Support Oct 5, 2005 - 6:54 AM

To avoid the problem with a dll collision, just put the Prof-UIS dll into the same folder as your executable module is in so that your application will always be able to use this dll independently of other Prof-UIS dlls. Having this dll in the System directory is a bad idea. Besides, each Prof-UIS version has its own unique name, so the conflict is hardly possible.

As for the statically linked resources, we will come back to this issue when working on the next release (after the upcoming major release).