<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Saving .xcb file</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Saving .xcb file]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 20:19:33 +0000</pubDate>
  <lastBuildDate>Thu, 15 Sep 2005 04:35:40 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=1099</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Saving .xcb file : Thanks it worked great! I should...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8633&amp;title=saving-xcb-file#8633</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1479">jayee</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 15 September 2005 at 4:35am<br /><br />Thanks it worked great!<br>I should have discovered DesignerSample yesterday...<br>]]>
   </description>
   <pubDate>Thu, 15 Sep 2005 04:35:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8633&amp;title=saving-xcb-file#8633</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : Try to move this code to LoadFrame...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8629&amp;title=saving-xcb-file#8629</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 15 September 2005 at 2:38am<br /><br /><P><FONT face=Arial>Try to move this code to LoadFrame as it done in DesignerSample. </FONT></P>]]>
   </description>
   <pubDate>Thu, 15 Sep 2005 02:38:24 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8629&amp;title=saving-xcb-file#8629</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : Hello!  I have a similar problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8615&amp;title=saving-xcb-file#8615</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1479">jayee</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 14 September 2005 at 9:20am<br /><br />Hello!<br><br>I have a similar problem with the ASSERT in CFrameWnd::LoadAccelTable.<br><br>All I have done is exported a xml file in Command Bars Designer andthis file is then loaded in the OnCreate call of my main frame.<br><br><span style="font-family: courier new,courier,mono;">&nbsp;&nbsp; CXTPPropExchangeXMLNode px(TRUE, 0, _T("DesignerFile"));<br>&nbsp;&nbsp; if (px.LoadFromFile(COMMAND_BARS_FILE))<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandBars-&gt;LoadDesignerBars(&amp;px);<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; else<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TRACE0("Failed to load command bars from file.\n");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -1;<br>&nbsp;&nbsp; }<br><br>&nbsp;&nbsp; return 0;<br><span style="font-family: arial,helvetica,sans-serif;"><br>I'm using Xtreme Suite Pro v9.70<br>How can I circumvent this assert?<br>Is the loading of the command bars too early?<br><br>Thanks<br></span></span>]]>
   </description>
   <pubDate>Wed, 14 Sep 2005 09:20:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8615&amp;title=saving-xcb-file#8615</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : It would appear the the problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8379&amp;title=saving-xcb-file#8379</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=537">Kenneth</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 27 August 2005 at 10:14pm<br /><br /><P>It would appear the the problem referenced above is not due to any problem in the CommandBarDesigner example application.&nbsp; When I trace the calls made, functions with the toolkitpro api is expecting the custom controls to be serialized within the .xcb file.&nbsp; However I see no facility to be able to accomplich this in the creation of the .xcb file itself.&nbsp; The end result is the toolkitpro api attempts to locatate the serialized controls within the .xcb file, thus messing up the pointers used to read the file, and results in an message "unexpected format".</P><P>A second problem happens when loading&nbsp;an .xcb file into an application, within the mainfrm OnCreate function, it appears that when the following functions are called:</P><P>&nbsp;CXTPPropExchangeSection secShortcuts(pPX-&gt;GetSection(_T("Shortcuts")));<BR>&nbsp;XTPShortcutManager()-&gt;DoPropExchange(&amp;secShortc uts,this);<BR>&nbsp;</P><P>will cause MFC to ASSERT in LoadAccelerators.&nbsp; Note that since the mainfrm function LoadFrame calls:</P><P>&nbsp;if(!CFrameWnd::LoadFrame(nIDResource,dwDefaultStyle,pP arentWnd,pContext))</P><P>then the the accelerator table pointer is not NULL, thus the ASSERT.</P><P>The .xcb file is loaded correctly, and all the command bars are created correctly, you just get the ASSERT.&nbsp; I suspect the accelerator pointer should be freeded, and set to NULL prior to the XTPShortcutManager()-&gt;DoPropExchange(&amp;secShortcuts,th is); call resetting the accelerator pointer.<BR></P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR></P><span style="font-size:10px"><br /><br />Edited by Kenneth</span>]]>
   </description>
   <pubDate>Sat, 27 Aug 2005 22:14:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=8379&amp;title=saving-xcb-file#8379</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : Ah, I see the problem now. Although...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2881&amp;title=saving-xcb-file#2881</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=537">Kenneth</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 25 August 2004 at 10:20am<br /><br /><P>Ah, I see the problem now.&nbsp; Although my program can correctly load the .xcb it created, the CommandBarDesigner cannot since my application uses classes such as CControlTools.&nbsp; This causes the CommandBarDesigner to abend in the LoadCommandBarList() function.</P><P>So I guess CommandBarDesigner will not work with any menu and or toolbar that uses CControlTools or anything esle other than a plain old menu or toolbar item.</P><P>Good concept, but rather useless.</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Wed, 25 Aug 2004 10:20:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2881&amp;title=saving-xcb-file#2881</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : I can add the following code to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2869&amp;title=saving-xcb-file#2869</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=537">Kenneth</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 24 August 2004 at 3:43pm<br /><br /><P>I can add the following code to my application, which does create a valid xcb file, which I can read back into my application.&nbsp; However, the CommandBarsDesigner sample application cannot load the file (it aborts looking for command bar id 0XFFEEFF.&nbsp; Also, I have an Animation control bar that does get created when I load the xcb file into the application, however the animation itself is never loaded.&nbsp; I checked the function:</P><P>&nbsp;int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)</P><P>which does get called, but the nID for the animation is not passed to this function.</P><P>So I guess the question is, what is the crazy stuff related to command bar id 0x(FFEEFF) when it comes to the CommandBarsDesigner application?&nbsp; And why, when loading from a xcb file, the animation nID is not getting passed to the OnCreateControl function?</P><P>The following is my code to create the xcb file.</P><P>&nbsp;void CMainFrame::DoSerializeCommandBars(CArchive&amp; ar)<BR>&nbsp;{<BR>&nbsp;CXTPCommandBars* pCommandBars = GetCommandBars();<BR>&nbsp;CXTPImageManager* pImageManager = pCommandBars-&gt;GetImageManager();<BR>&nbsp;for(int i = 0; i &lt; pCommandBars-&gt;GetCount(); i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPToolBar* pTBar = pCommandBars-&gt;GetAt(i);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pTBar-&gt;GetControls()-&gt;ClearOriginalControls();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;// Save Docking Position and Controls<BR>&nbsp;pCommandBars-&gt;SerializeBarState(ar,TRUE);<BR>&nbsp;// Save Icons<BR>&nbsp;pImageManager-&gt;Serialize(ar);<BR>&nbsp;// Save Accelerators:<BR>&nbsp;XTPShortcutManager()-&gt;SerializeShortcuts(this,ar);<BR>&nbsp;// Save Options<BR>&nbsp;if(m_nTheme == ID_THEME_NATIVEWINXP)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Theme = (XTPPaintTheme)xtpThemeNativeWinXP;<BR>&nbsp;if(m_nTheme == ID_THEME_OFFICE2003)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_Theme = (XTPPaintTheme)xtThemeOffice2003;<BR>&nbsp;ar.Write(&amp;m_Theme,sizeof(XTPPaintTheme));<BR> &nbsp;pCommandBars-&gt;GetCommandBarsOptions()-&gt;Serialize (ar);<BR>&nbsp;// Save m_bCustomizable<BR>&nbsp;m_bCustomizable = FALSE;<BR>&nbsp;ar &lt;&lt; m_bCustomizable;<BR>&nbsp;// Save Dummy Rectangle<BR>&nbsp;CRect rc(10,10,300,300);<BR>&nbsp;ar.Write(rc,sizeof(CRect));<BR>&nbsp;}<BR></P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 24 Aug 2004 15:43:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2869&amp;title=saving-xcb-file#2869</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : Yes, I looked at that, but in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2864&amp;title=saving-xcb-file#2864</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=537">Kenneth</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 24 August 2004 at 10:04am<br /><br /><P>Yes, I looked at that, but in order to understand that requires a lot of knowledge about the internals of the toolkit.&nbsp; Like, where in a normal application does the variable m_pControls get set?&nbsp;That appears to be a critical element of the Serialize function. &nbsp;Does this imply that the embeddedframe class must be incorporated into a user application in order to create a .xcb file for the controls created in that application?</P><P>&nbsp;</P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by Kenneth</span>]]>
   </description>
   <pubDate>Tue, 24 Aug 2004 10:04:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2864&amp;title=saving-xcb-file#2864</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : You can see it in void CEmbedd...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2858&amp;title=saving-xcb-file#2858</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 24 August 2004 at 6:49am<br /><br /><P>You can see it in void CEmbeddedFrame::Serialize(CArchive&amp; ar)</P><P>of Samples\Common\CommandBarsDesigner\EmbeddedFrame.cpp </P>]]>
   </description>
   <pubDate>Tue, 24 Aug 2004 06:49:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2858&amp;title=saving-xcb-file#2858</guid>
  </item> 
  <item>
   <title><![CDATA[Saving .xcb file : What is the correct methd to create...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2856&amp;title=saving-xcb-file#2856</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=537">Kenneth</a><br /><strong>Subject:</strong> 1099<br /><strong>Posted:</strong> 23 August 2004 at 12:58pm<br /><br />What is the correct methd to create an .xcb file from an application that has created the Commandbars internally.&nbsp; We need to take a current application, create a .xcb file, then allow our users to use the CommandBarsDesigner program to create their custom CommandBars.]]>
   </description>
   <pubDate>Mon, 23 Aug 2004 12:58:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1099&amp;PID=2856&amp;title=saving-xcb-file#2856</guid>
  </item> 
 </channel>
</rss>