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 |
|
YS Jang
|
Jul 22, 2006 - 12:23 AM
|
Hi,
Recently, I have changed Prof-uis 2.54 instead of 2.50
But, The error occurs on the InstallPaintManager()
=============
CMainFrame::CMainFrame() { g_PaintManager.InstallPaintManager(new CExtPaintManagerOffice2007_R2_LunaBlue); .... }
CExtPaintManagerOffice2007_R2_LunaBlue::CExtPaintManagerOffice2007_R2_LunaBlue() { .... VERIFY(m_bmpDCA.LoadBMP_Resource(MAKEINTRESOURCE(IDB_EXT_2007_DCA_LUNA_BLUE); .... }
CExtBitmap::LoadBMP_Resource(...) { ... if (hInst == NULL) { hInst = g_ResourceManager.FindResourceHandle(...);
//the error occurs //hInst is NULL if (hInst == NULL) { ... return false; //Exit Program } } } g_PaintManager.InstallPaintManager(new CExtPaintManagerOffice2007_R2_LunaBlue); .... }
How can I resolve this? thanks..
|
|
Technical Support
|
Jul 23, 2006 - 12:29 PM
|
Please check the following: 1) Do not invoke the g_PaintManager.InstallPaintManager() code in the constructor of your CWinApp -derived class. You can use the InitInstance() method of this class or any method (including a constructor) of the class which implements the main window. 2) If you link you app with Prof-UIS statically, please add the following lines to the .rc2 file of your project: #if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
#include <Resources/Resource.rc>
#endif You can see these lines in all the .rc2 files in our samples. This allows Prof-UIS resources to be embedded into your compiled EXE (or DLL). As a result, the static Prof-UIS has the same feature set as the Prof-UIS DLL.
|
|