Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - migration from XTP8 to XTP12
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

migration from XTP8 to XTP12

 Post Reply Post Reply
Author
Message
lion View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote lion Quote  Post ReplyReply Direct Link To This Post Topic: migration from XTP8 to XTP12
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
lion View Drop Down
Groupie
Groupie


Joined: 04 March 2008
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote lion Quote  Post ReplyReply Direct Link To This Post 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 ?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.184 seconds.