Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - import XML in Commandbar designer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

import XML in Commandbar designer

 Post Reply Post Reply
Author
Message
jerry2000 View Drop Down
Newbie
Newbie


Joined: 22 April 2004
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote jerry2000 Quote  Post ReplyReply Direct Link To This Post Topic: import XML in Commandbar designer
    Posted: 12 May 2005 at 8:10am
Hi
I have a created a commandbars XML file from the sample "DesignerSample" with this part of code:

    CXTPCommandBars* pCommandBars = GetCommandBars();
    CXTPImageManager* pImageManager = pCommandBars->GetImageManager();

    XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;
    param.bSerializeControls = TRUE;
    param.bSaveOnlyCustomized = FALSE;
    param.bSerializeDesignerControls = TRUE;

    // Serialize to XML
    CXTPPropExchangeXMLNode px(FALSE, 0, _T("DesignerFile"));
    pCommandBars->DoPropExchange(&px, &param);

    // Icons
    CXTPPropExchangeSection secImages(px.GetSection(_T("Images")));
    pImageManager->DoPropExchange(&secImages);

    // Accelerators:
    CXTPPropExchangeSection secShortcuts(px.GetSection(_T("Shortcuts")));
    XTPShortcutManager()->DoPropExchange(&secShortcuts, this);

    px.SaveToFile(_T("test.xml"));

When i import the XML in the designer the "controls tab" is empty.
I have analysed the XML file. In my file the sections "Shortcuts", "Options", "ResourceManager" doesn't exist. Is this the problem,

because i don't need this sections.

I need to get the contols tab to work, because i want to edit menu entries. Toolbar entries editing does work.

thanks

P.s.: For this peace of code and the loading of this designed bars, i have needed 1 day of work (to find information in forum and in the source code).  With a simple example this should be done in 5 minutes.


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 12 May 2005 at 3:32pm

Hello, Jerry

bSerializeDesignerControls was not implemented for _saving_ in 9.60.1, It is added in 9.70.

Sorry about it.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.046 seconds.