Print Page | Close Window

migration from XTP8 to XTP12

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12228
Printed Date: 17 May 2024 at 11:10pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: migration from XTP8 to XTP12
Posted By: lion
Subject: migration from XTP8 to XTP12
Date Posted: 22 September 2008 at 3:43am
Hi,
I am trying to migrate our app from xtp8 to xtp12. So far that was easy... But now I run into a problem with the "SaveCommandBars(..)" operation.

When deleting all app-entries from the registry and starting the app, everything is fine. When stopping the app the onClose(..) calls "SaveCommandBars(..)" saving to the registry. When I restart the app the menus are not the same anymore...

Can anyone tell me what has chenged with this operation from 8 to 12 ?
Or where to look for more details on this?

Cheers B



Replies:
Posted By: Oleg
Date Posted: 22 September 2008 at 5:20am
Hi,
If you create all CommandBars in code and not use resources, call
 
pToolBar->GetControls()->CreateOriginalControls() before you load commandbars.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: lion
Date Posted: 22 September 2008 at 5:48am
Hi,
thanx for your answer.
Meanwhile i found out the following:
when I change "SaveCommandBars(..)" in "xtp12\Source\CommandBars\XTPFrameWnd.h" like shown below, calling "SaveBarState(..)" while setting "bOnlyCustomized"=0, then it works:

void SaveCommandBars(LPCTSTR lpszProfileName)
    {
        if (m_pCommandBars)
        {
            m_pCommandBars->SaveOptions(lpszProfileName);
            //m_pCommandBars->SaveBarState(lpszProfileName);
            m_pCommandBars->SaveBarState(lpszProfileName,0);
            m_pCommandBars->GetShortcutManager()->SaveShortcuts(lpszProfileName);
        }
    }

what do you think about that ?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net