<?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 : Shortcut Keys....</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Shortcut Keys....]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 13 Jun 2026 05:31:30 +0000</pubDate>
  <lastBuildDate>Tue, 24 Nov 2009 12:22:48 +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=15697</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[Shortcut Keys.... : I save my command bars, shortcuts,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15697&amp;PID=55110&amp;title=shortcut-keys#55110</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3717">Smucker</a><br /><strong>Subject:</strong> 15697<br /><strong>Posted:</strong> 24 November 2009 at 12:22pm<br /><br />I save my command bars, shortcuts, customize options, and docking panes to an XML file. This works for me:<br><br><font face="Courier New, Courier, mono">void CMainFrame::ExchangeLayout(CXTPPropExchange* pPX, BOOL bSerializeControls /*= TRUE*/)<br>{<br>&nbsp;&nbsp;&nbsp; XTP_COMMANDBARS_PROPEXCHANGE_PARAM param;<br>&nbsp;&nbsp;&nbsp; param.bSerializeControls = bSerializeControls; <br>&nbsp;&nbsp;&nbsp; param.bSerializeOptions = TRUE;<br><br>&nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxCommandBars(pPX-&gt;GetSection(_T("CommandBars")));<br>&nbsp;&nbsp;&nbsp; GetCommandBars()-&gt;DoPropExchange(&amp;pxCommandBars, &amp;param);<br><br>&nbsp;&nbsp;&nbsp; CXTPPropExchangeSection secShortcuts(pPX-&gt;GetSection(_T("Shortcuts")));<br>&nbsp;&nbsp;&nbsp; GetCommandBars()-&gt;GetShortcutManager()-&gt;DoPropExchange(&amp;secShortcuts);<br><br>&nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxDockingPane(pPX-&gt;GetSection(_T("DockingPane")));&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; m_paneManager.DoPropExchange(&amp;pxDockingPane);<br>}</font><br><br>In <font color="#0000ff">CMainFrame::OnCreate()</font>:<br><br><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; CXTPPropExchangeXMLNode px(TRUE, 0, _T("Settings"));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // To serialize to XML file<br>&nbsp;&nbsp;&nbsp; if (px.LoadFromFile(::g_XmlIniFile)) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxNormalLayout(px.GetSection(_T("NormalLayout")));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ExchangeLayout(&amp;pxNormalLayout);<br>&nbsp;&nbsp;&nbsp; }<br></font><br>in <font color="#0000ff">CMainFrame::OnClose()</font>:<br><br><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; CXTPPropExchangeXMLNode px(FALSE, 0, _T("Settings"));&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // To serialize to XML file<br>&nbsp;&nbsp;&nbsp; if (px.OnBeforeExchange())&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPPropExchangeSection pxNormalLayout(px.GetSection(_T("NormalLayout")));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ExchangeLayout(&amp;pxNormalLayout);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; px.SaveToFile(::g_XmlIniFile);<br>&nbsp;&nbsp;&nbsp; }<br></font><br>Hope this helps.<br><br><br>]]>
   </description>
   <pubDate>Tue, 24 Nov 2009 12:22:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15697&amp;PID=55110&amp;title=shortcut-keys#55110</guid>
  </item> 
  <item>
   <title><![CDATA[Shortcut Keys.... : I added a CXTPCustomizeKeyboardPage...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15697&amp;PID=55096&amp;title=shortcut-keys#55096</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=374">ddlittle</a><br /><strong>Subject:</strong> 15697<br /><strong>Posted:</strong> 23 November 2009 at 11:00am<br /><br /><P>I added a <FONT color=#020002 size=2><FONT color=#020002 size=2>CXTPCustomizeKeyboardPage to my customize toolbars and it seems to work fine.&nbsp; The next step is to make the changes persistant, <FONT face="Verdana, Arial, Helvetica, sans-serif">but this code doesn't seem to save anything:</FONT></P></FONT></FONT><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"><FONT color=#020002 size=2><FONT color=#020002 size=2><table width="99%"><tr><td><pre class="BBcode"></FONT></FONT></FONT></DIV><DIV><FONT face="Courier New, Courier, mono"><FONT color=#020002 size=2><FONT color=#020002 size=2>GetCommandBars</FONT></FONT><FONT size=2>()-&gt;</FONT><FONT color=#020002 size=2><FONT color=#020002 size=2>GetShortcutManager</FONT></FONT><FONT size=2>()-&gt;</FONT><FONT color=#020002 size=2><FONT color=#020002 size=2>SaveShortcuts</FONT></FONT><FONT size=2>(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Input Hotkeys"</FONT></FONT><FONT size=2>);</FONT></FONT></DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"><FONT size=2></pre></td></tr></table></FONT></FONT></DIV><DIV><FONT size=2 face="Verdana, Arial, Helvetica, sans-serif"></FONT>&nbsp;</DIV><DIV><FONT size=2 face="Verdana, Arial, Helvetica, sans-serif">which means that nothing happens when I call this in CMainFrame::OnCreate():</FONT></DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"><FONT color=#020002 size=2><FONT color=#020002 size=2><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><DIV><FONT face="Courier New, Courier, mono">GetCommandBars</FONT></FONT></FONT></FONT><FONT face="Courier New, Courier, mono"><FONT size=2>()-&gt;</FONT><FONT color=#020002 size=2><FONT color=#020002 size=2>GetShortcutManager</FONT></FONT><FONT size=2>()-&gt;</FONT><FONT color=#020002 size=2><FONT color=#020002 size=2>LoadShortcuts</FONT></FONT><FONT size=2>(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Input Hotkeys"</FONT></FONT><FONT size=2>);</FONT></FONT></DIV><DIV><FONT size=2><FONT face="Verdana, Arial, Helvetica, sans-serif"></pre></td></tr></table></FONT></DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"></FONT>&nbsp;</DIV><DIV>I couldn't find any samples containing SaveShortcuts, but I did notice that Load/SaveCommandBars() contains a call to matching shortcut functions, but my user-defined hotkeys remain non-persistent.</DIV><DIV>&nbsp;</DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif">Any ideas?&nbsp; </FONT></DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"></FONT>&nbsp;</DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif">Thanks!</FONT></DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif"></FONT>&nbsp;</DIV><DIV><FONT face="Verdana, Arial, Helvetica, sans-serif">- David</FONT></DIV><DIV></FONT><FONT size=2></FONT></DIV><FONT size=2></DIV></FONT>]]>
   </description>
   <pubDate>Mon, 23 Nov 2009 11:00:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15697&amp;PID=55096&amp;title=shortcut-keys#55096</guid>
  </item> 
 </channel>
</rss>