|
|
|
|
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 |
|
Roongrit Charoensupkul
|
Feb 27, 2007 - 8:34 PM
|
I tried to change my application to use ProfUIs lib statically with MFC dll. I’ve followed the FAQ which are
uncomment "#define __EXT_PROFUIS_STATIC_LINK_WITH_RESOURCES" in prof-uis.h and rebuild the Prof-UIs library.
add these line in my application’s .rc2 file
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) ) #include <Resources/Resource.rc> #endif
My application can be compiled successfully, but fail on running. The debug assertion showed when trying to InstallPaintManager in extpaintmanager.cpp file at
VERIFY( m_bmpAdvTipBorder.LoadBMP_Resource( MAKEINTRESOURCE( IDB_EXT_2007_ADV_TIP_BORDER ) ) );
My application uses RibbonBar, CExtPaintManagerOffice2007_Silver theme.
What should I do to configure my application to use Prof-UIs statically?
|
|
Malcolm D
|
Jul 3, 2007 - 4:39 PM
|
Guess #3: You forgot to put the __STATPROFUIS_WITH_DLLMFC__ in the preprocessor for the Resources as well (this one is easily missed) Guess #4: You are building a dll and forgot to add __PROF_UIS_FOR_REGULAR_DLL
|
|
Suhai Gyorgy
|
Feb 28, 2007 - 2:12 AM
|
The same FAQ that you are quoting contains the followings as well: "To use Prof-UIS as a static library linked to your project that is dynamically linked with MFC, do the following:
1. Build the appropriate configuration of the profuislib library project, e.g. Static MBCS Debug with MFC DLL. 2. Modify the settings of your project by adding __STATPROFUIS_WITH_DLLMFC__ to the Preprocessor Definitions field in the C/C++ and Resources categories. 3. Compile your project."
Didn’t you accidently forget to do step #2?
|
|
Roongrit Charoensupkul
|
Feb 28, 2007 - 2:58 AM
|
I added __STATPROFUIS_WITH_DLLMFC__ in the preprocessor already and now my application linked with ProfUIS264yud.lib, but my application fail on that line. I don’t know why the application doesn’t know the meaning of IDB_EXT_2007_ADV_TIP_BORDER. Are there any instructions that I can check whether my application already loaded the Prof-UIs’ resource?
|
|
Suhai Gyorgy
|
Feb 28, 2007 - 5:01 AM
|
Guess #1: Are you using identifier value 29238 in any of your own resources (that is value of IDB_EXT_2007_ADV_TIP_BORDER)? Guess #2: Maybe for some reason line #include "Res2007\\Res2007.rc" is commented in your Prof-UIS\Include\Resources\resource.rc file, that could also prevent your application to load 2007 resources.
|
|
Technical Support
|
Feb 28, 2007 - 4:52 AM
|
The steps mentioned in How to link statically with Prof-UIS? should be enough to successfully build any application statically linked with Prof-UIS. Besides, any Prof-UIS sample features a static configuration. Please make sure once again that you correctly followed the FAQ.
|
|