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

Import XML in designer

 Post Reply Post Reply
Author
Message
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Topic: Import XML in designer
    Posted: 22 March 2006 at 3:22am

Hi,

I am trying to import an XML customization file in the Designer Studio but I get a failure message box. It also happens in Xtreme samples which uses XML layout mechanism (such as GUI_Whidbey and Grep).

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: 22 March 2006 at 7:31am

Hello,

Just replace root section in text Editor to DesignerFile.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 22 March 2006 at 8:46am

Hi,

I replaced the root section. Now I dont get the error message, but I get an empty Form (without menu or toolbar). I attached an .xml file of the "Grep" sample after I edit the root section.2006-03-22_084639_GrepD.zip 

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: 22 March 2006 at 10:03am

Now you have two CommandBars sections:

must be:

 

<?xml version="1.0" encoding="UTF-8"?>
<DesignerFile CompactMode="1">
  <CommandBars>
     <CommandBar Class="CXTPMenuBar" Type="0" BarID="1"

...

 </CommandBars>
  <Layout>

   ...
  </Layout>
</DesignerFile>

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2006 at 9:15am

I removed the extra "CommandBars" section, but still the import operation results an empty forum. I attached my new .xml file.2006-03-29_091509_GrepD.zip

 

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: 29 March 2006 at 9:29am
Now you deleted Layout section :)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2006 at 10:10am
thanks, now I get a good forum. (I thought that the Layout section was obsolete...)
Back to Top
yoavo View Drop Down
Senior Member
Senior Member


Joined: 29 February 2004
Location: Israel
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavo Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2006 at 7:24am

Hi,

I have an .xml file which contains several layouts (of commandbars). Can I import this xml file to the Designer ?

If yes, what should be the structure of the file ?

I tried to right it like this: (but it didnt load ok)

<?xml version="1.0" encoding="UTF-8"?>
<DesignerFile CompactMode="1">
  <MyLayout1>
    <CommandBars>
      <CommandBar Class="CXTPMenuBar" Type="0" BarID="1"

...

    </CommandBars>
  </MyLayout1>
  <MyLayout2>
    <CommandBars>
      <CommandBar Class="CXTPMenuBar" Type="0" BarID="1"

...

    </CommandBars>
  </MyLayout2>
  <Layout>

   ...
  </Layout>
</DesignerFile>

 

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: 30 March 2006 at 10:20am

You can import only single layout.

remove <MyLayout1>  </MyLayout1>

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.066 seconds.