<?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 Quick Access Toolbar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Saving Quick Access Toolbar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 14 Apr 2026 10:48:24 +0000</pubDate>
  <lastBuildDate>Tue, 17 Jun 2014 06:51:06 +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=22328</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 Quick Access Toolbar : Hi,I&amp;#039;m trying to load/save...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22328&amp;PID=72542&amp;title=saving-quick-access-toolbar#72542</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8719">Dan</a><br /><strong>Subject:</strong> 22328<br /><strong>Posted:</strong> 17 June 2014 at 6:51am<br /><br />Hi,<div><br></div><div>I'm trying to load/save user's custom changes to the Quick Access Toolbar using Toolkit Pro v16.3.1.</div><div><br></div><div>I originally thought that something like this would work in the OnClose function ...</div><div><br></div><div><div>CFile fSettings;</div><div>if (fSettings.Open("c:\\setttings.xtb", CFile::modeCreate | CFile::modeWrite))</div><div>{</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>CArchive ar(&amp;fSettings, CArchive::store);</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>CXTPPropExchangeArchive px(ar);</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>CXTPRibbonQuickAccessControls *pQA = m_pRibbonBar-&gt;GetQuickAccessControls();</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>pQA-&gt;DoPropExchange(&amp;px);<span ="Apple-tab-span" style="white-space:pre">		</span>// Causes ASSERT here</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>ar.Close();</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>fSettings.Close();</div><div>}</div></div><div><br></div><div>The&nbsp;<span style="line-height: 1.4;">CXTPRibbonQuickAccessControls class doesn't have its own DoPropExchange so this function is calling&nbsp;</span><span style="line-height: 1.4;">CXTPControls::DoPropExchange, and that seems to be expecting the m_dwData member of the CXTPPropExchange to be a pointer to a&nbsp;</span><span style="line-height: 1.4;">XTP_COMMANDBARS_PROPEXCHANGE_PARAM struct...</span></div><div><span style="line-height: 1.4;"><br></span></div><div><div>void CXTPControls::DoPropExchange(CXTPPropExchange* pPX)</div><div>{</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>ASSERT(pPX-&gt;m_dwData != 0);</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>XTP_COMMANDBARS_PROPEXCHANGE_PARAM* pParam = <span ="Apple-tab-span" style="white-space:pre">		</span>(XTP_COMMANDBARS_PROPEXCHANGE_PARAM*)pPX-&gt;m_dwData;</div></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>...</div><div>}</div><div><br></div><div>I'm not sure how I supposed to know that - so I suspect that I shouldn't be doing this.</div><div><br></div><div>However, I continued and fixed the assert by adding these lines before the DoPropExchange call...</div><div><br></div><div><div>XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;&nbsp;</div><div>param.bSaveOnlyCustomized = FALSE;</div><div>param.bSaveOriginalControls = FALSE;</div><div>param.bSerializeActions = FALSE;</div><div>param.bSerializeControls = TRUE;</div><div>param.bSerializeDesignerControls = FALSE;</div><div>param.bSerializeImages = FALSE;</div><div>param.bSerializeLayout = FALSE;</div><div>param.bSerializeOptions = FALSE;</div><div>px.m_dwData = (DWORD_PTR)&amp;param;</div></div><div><br></div><div>That seemed to solve the problem - and indeed it appears that the quick access toolbar settings are saved to c:\\settings.xtb.</div><div><br></div><div>Loading had similar issues ... the m_dwData had to be initialized to a pointer to the&nbsp;XTP_COMMANDBARS_PROPEXCHANGE_PARAM struct, and I had to set &nbsp;param.pCommandBars = GetCommandBars().</div><div><br></div><div>Saving &amp; Loading then appears to be working - but is there a better way of accomplishing this?</div><div><br></div><div>The Ribbon Bar sample applications included with Codejock 16.3.1 both have saving/loading routines commented out and enabling them either results in a crash, or the changes made to the Quick Access Toolbar not being saved and restored anyway.</div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div>Thanks,</div><div><br></div><div>Dan</div>]]>
   </description>
   <pubDate>Tue, 17 Jun 2014 06:51:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22328&amp;PID=72542&amp;title=saving-quick-access-toolbar#72542</guid>
  </item> 
 </channel>
</rss>