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 General Discussion » Issues when switching from version 2.51 to version 2.53 Collapse All
Subject Author Date
Jayender S Mar 31, 2006 - 5:41 AM

Hi
i have been using version 2.51 for the few months when switching to version 2.53 i got the following runtime errors
File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtGridWnd.cpp
Line: 477
Line: 480
Line: -24394

File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtCmdManager.cpp
Line: 1335

File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtCustomize.cpp
Line: 5268

Then

i have used this method in verion 2.51
CExtCmdIcon _icon(Handle,color,&Icon);
but i read that i have to remove this method while using version 2.53

and also the following method
// REMOVED 2.53
// // get command hIcon
// HICON CmdGetHICON(
// __EXT_MFC_SAFE_LPCTSTR sProfileName,
// UINT nCmdID
// )
// {
// CExtCmdIcon * pIcon =
// CmdGetIconPtr(sProfileName,nCmdID);
// if( pIcon == NULL )
// return NULL;
// ASSERT( !(pIcon->IsEmpty()) );
// HICON hIcon = (*pIcon);
// ASSERT( hIcon != NULL );
// return hIcon;
// }

How to solve this problem? Help me.

Thanks

Gunasekaran Velu

Jayender S Apr 3, 2006 - 5:01 AM

thanks i added the following code in .rc2 file
#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) ) #include <Resources/Resource.rc>#endif


now i did not get the error thank u so much for helping me.

Jayender S Apr 2, 2006 - 5:55 AM

i followed ur instrction that means i uninstall version 2.21 completly and install the version 2.53 but till now i got the same error i did not use CExtCmdManager::CmdGetHICON() in vesion 2.53 the following runtime error are occures.

i have been using version 2.51 for the few months when switching to version 2.53 i got the following runtime errors
File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtGridWnd.cpp
Line: 477
Line: 480
Line: -24394

File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtCmdManager.cpp
Line: 1335

File: E:\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtCustomize.cpp
Line: 5268

help me
Thnx
Gunasekaran Velu

Technical Support Apr 2, 2006 - 7:09 AM

All the runtime errors you reported relate to failure of loading resources. If your project uses Prof-UIS as a static library, add the following files to .rc2 file:

#if ( !(defined _AFXDLL && !defined __STATPROFUIS_WITH_DLLMFC__) )
    #include <Resources/Resource.rc>
#endif
You can read more about this issue in the article How to link statically with Prof-UIS?

If your project is linked with Prof-UIS dynamically, please make sure that Prof-UIS resource identifiers and your project resource identifiers do not collide each other.

Jayender S Mar 31, 2006 - 8:57 PM

thanks,

i will try to uninstall 2.51 and install 2.53 completetly.

Technical Support Mar 31, 2006 - 7:49 AM

We cannot confirm that Prof-UIS 2.53 cannot be compiled successfully. Please check whether you correctly updated Prof-UIS 2.51 installed on your machine. We recommend you uninstall 2.51 completely and install a clean copy of 2.53. You will be able to compile Prof-UIS 2.53 without any error and warning.

We confirm CExtCmdIcon has been modified. In fact, the new version is rewritten from scratch. We support most of the previous methods and excluded some methods using icon handles because the new icon class is not based on HICON. So, just do not use the CExtCmdManager::CmdGetHICON() method anymore. Please use the CExtCmdManager::CmdGetIconPtr() and CExtCmdIcon::ExtractHICON() methods instead. The latter method creates a new HICON handle and your code is responsible for destroying this handle. To initialize the CExtCmdIcon object from the existing HICON handle, invoke the CExtCmdIcon::AssignFromHICON() method

Jayender S Apr 17, 2006 - 5:41 AM

can u post the sample code for the CExtCmdManager::CmdGetIconPtr() and CExtCmdIcon::ExtractHICON() instead of CExtCmdManager::CmdGetHICON()

My Code

HICON hIconOle =g_CmdManager->CmdGetHICON(
g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ),
         ID_OLE_INSERT_NEW
         );
ASSERT( hIconOle != NULL );

can u give the sample code for the above code plz hwlp me.

Technical Support Apr 17, 2006 - 10:54 AM

As we mentioned before, the solution is as follows:

const CExtCmdIcon * pCmdIcon =
        g_CmdManager->CmdGetIconPtr(
            g_CmdManager->ProfileNameFromWnd( GetSafeHwnd() ),
            ID_OLE_INSERT_NEW
        );
    if( pCmdIcon != NULL && (! pCmdIcon->IsEmpty() ) )
    {
        HICON hIcon = pCmdIcon->ExtractHICON();
        if( hIcon != NULL )
        {
            . . .
            ::DestroyIcon( hIcon );
        }
    }
Please put this code instead of the code given in your message and replace the . . . with your code which works with the icon handle.