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 » Problem with Prof-UIS 2.52 resources in static library. Collapse All
Subject Author Date
Thomas Roeder Jan 25, 2006 - 12:18 PM

Hi,


I was trying what did you suggest in your FAQ(static library linking), but it’s not working for me.


I’m constantly getting an assertion error when library’s source files try to load some library’s resouces.


For example:


 m_hCursorResizingH =
  pApp->LoadCursor( MAKEINTRESOURCE( IDC_EXT_RESIZE_H1 ) );
 ASSERT( m_hCursorResizingH != NULL );


I’m using VC++ 2003 .NET . With version 2.50 everything is working.


Any suggestion?


 

Technical Support Jan 25, 2006 - 12:53 PM

The only one thing that may cause errors while loading resources in your case is that the resources are not available. So we guess that you simply forgot to include Prof-UIS resources into your *.rc2 file:

///////////////////////////////////////////////////////////////////////////// 
// Add manually edited resources here... 
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) ) 
        #include <Resources/Resource.rc> 
#endif 
/////////////////////////////////////////////////////////////////////////////

Thomas Roeder Jan 25, 2006 - 2:25 PM

Sorry,


But I did that.


Everything is accordingly included in my *.rc2 file.


And Prof-UIS resources was copied from ...MyProj\Prof-UIS\Include\Resources to ...MyProj\res\Resources


But the program seems do not see the ...MyProj\res\Resources\resource.h , resource.rc and resources itself(...MyProj\res\Resources\res *.*).


Should I add some settings in project properties?


Could you send me some simple program with ProfUIS252ymd.lib which use some library’s resources(grid control, etc).


Thanks.

Technical Support Jan 26, 2006 - 11:46 AM

It seems you did not completely correctly follow that FAQ. You do not need to copy the Prof-UIS resources to the project res folder? As for the sample program, please take a look at any Prof-UIS sample which can be compiled statically. For instance, the SDI.rc2 file of the SDI sample application contains the following lines:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif
Simply include the above lines into the .RC2 file of your project and specify the .../Prof-UIS/Include path in the Additional Folders paths of the Resource Compiler settings of your project.