Print Page | Close Window

import XML in Commandbar designer

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=2216
Printed Date: 08 November 2025 at 12:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: import XML in Commandbar designer
Posted By: jerry2000
Subject: import XML in Commandbar designer
Date 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.





Replies:
Posted By: Oleg
Date 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



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