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 |
|
George Freewood
|
Jul 27, 2007 - 1:28 AM
|
Hello,
we have encountered a problem with the resource handling of Prof-UIS.
Our applications need to make use of AfxSetResourceHandle(), statically linked Prof-UIS and the possibility to store resources like menus, strings, bitmap and cursors in separate (language dependent) DLLs.
Some of Prof-UIS’s classes, however, bend the separate resource handle set by the application back to the main instance handle (which points to resources stored in the .EXE file). This is done by means of CExtLocalResourceHelper.
Since we cannot change our current approach for many reasons we would appreciate a small extension, with which we can prevent CExtLocalResourceHelper from bending the resource handle.
A possible solution could be the introduction of a global variable (say "bool CExtLocalResourceHelper::g_UseResourceHandle") and program code similar to this:
CExtLocalResourceHelper() : m_hInstPrevResource( NULL ) , m_bFree( true ) { #if (!defined __EXT_PROFUIS_STATIC_LINK) Init( __PROF_UIS_MODULE_NAME ); #else Init(g_UseResourceHandle ? ::AfxGetResourceHandle() : ::AfxGetInstanceHandle() ); #endif // #if (!defined __EXT_PROFUIS_STATIC_LINK) };
Many thanks in advance for any support you can provide here.
|
|
Technical Support
|
Jul 27, 2007 - 11:26 AM
|
We accept your suggestion. Thank you. The new CExtLocalResourceHelper::g_bUseResourceHandle static member does the same as the g_UseResourceHandle variable in your message.
|
|