Professional UI Solutions
Site Map   /  Register


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 General Discussion » test_page_sheet Asserts on LoadBMP_Resource Collapse All
Subject Author Date
Krustys Donuts Apr 16, 2008 - 1:19 PM

My name is Gil Ross and I work for Russ Berman at Velocity11. We just upgraded from Prof-UIS 2.52 to Prof-UIS 2.82. When I run the test_page_sheet test app in the debugger, I receive a debug assertion.  This problem occurs when LoadBMP_Resource is called with a sResourceID of 0x0000777e and a resource type of 0x00000002. It seems that it cannot find the bitmap. Other sample programs (e.g. FilteredGrids) execute without problems. Below is the call stack at the time of the assertion. Any help would be greatly appreciated.




  mfc80d.dll!AfxGetResourceHandle()  Line 24 + 0x1e bytes C++

  mfc80d.dll!AfxFindResourceHandle(const char * lpszName=0x0000777e, const char * lpszType=0x00000002)  Line 239 + 0x5 bytes C++

  ProfUIS282md.dll!CExtResourceManager::FindResourceHandle(const char * strResourceType=0x00000002, unsigned int nResourceName=0x0000777e, unsigned short * p_wLangIdOut=0x00000000, HRSRC__ * * p_hResourceOut=0x00000000)  Line 4975 + 0xd bytes C++

> ProfUIS282md.dll!CExtBitmap::LoadBMP_Resource(const char * sResourceID=0x0000777e, const char * sResourceType=0x00000002, HINSTANCE__ * hInst=0x00000000, bool bMake32=false, bool bEnableThrowException=false)  Line 1312 + 0x28 bytes C++

  ProfUIS282md.dll!CExtPaintManager::CExtPaintManager()  Line 731 + 0x1b bytes C++

  ProfUIS282md.dll!CExtPaintManager::CreateObject()  Line 206 + 0x66 bytes C++

  mfc80d.dll!CRuntimeClass::CreateObject()  Line 142 + 0x8 bytes C++

  ProfUIS282md.dll!CExtPaintManager::CExtPaintManagerAutoPtr::InstallPaintManager(CRuntimeClass * pRtcPaintManager=0x01080d3c)  Line 1595 + 0x8 bytes C++

  test_page_sheet.exe!CTestApp::CTestApp()  Line 32 + 0x1e bytes C++

Technical Support Apr 18, 2008 - 3:32 AM

It may be that Prof-UIS is used as a static library in your project (rather than as a dll). But in static versions of early Prof-UIS (including v.2.52) not all the features (available when you use Prof-UIS as a dll) were presented. In fact early Prof-UIS static libraries did not include resources. It is not the case for later Prof-UIS versions including 2.82. DLL has its own resource section inside its DLL file. The static library requires Prof-UIS resources included into resources of your project. If you take a look at any .RC2 file of any sample application provided with Prof-UIS 2.82, then you will find the following lines there:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
      #include <Resources/Resource.rc>
You should insert these lines "as is" into the .RC2 file of your project.