Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

The simplest way is to change settings of your project to Use MFC in a Static Library. This will make Prof-UIS be statically linked as well. Do not forget to build the appropriate configuration of the profuislib project first, e.g. Static MBCS Debug if your application uses the Multi-Byte Character Set.

To use Prof-UIS as a static library linked to your project that is dynamically linked with MFC, do the following:

  •    Build the appropriate configuration of the profuislib library project, e.g. Static MBCS Debug with MFC DLL.
  •    Modify the settings of your project by adding __STATPROFUIS_WITH_DLLMFC__ to the Preprocessor Definitions field in the C/C++ and Resources categories.
  •    Compile your project.

As you know, static libraries typically do not contain any resources inside. That means, if you use Prof-UIS as a static library, you cannot use any resource-dependent features like customization, color selection and icon editor dialogs, localization, and etc. But starting from Prof-UIS 2.52, we introduced an easy way to enable the resource-dependent features in static builds. The workaround is based on including Prof-UIS resources directly to your project. To make all the resource-dependent features available in your project that is statically linked with Prof-UIS, do the following:

  •    Rebuild the appropriate Win32 Static � configuration of the profuislib project, e.g Static MBCS Debug.
  •    Add these lines to your *.rc2 file just after Add manually edited resources here...
  • ///////////////////////////////////////////////////////////////////////////// 
    // Add manually edited resources here... 
    #if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) ) 
    #include <Resources/Resource.rc> 
    #endif /////////////////////////////////////////////////////////////////////////////