<?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 : CXTPC&#111;ntrolEdit in CommandBar Accel bug</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CXTPC&#111;ntrolEdit in CommandBar Accel bug]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 09:33:15 +0000</pubDate>
  <lastBuildDate>Mon, 29 Mar 2004 00:22:01 +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=576</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[CXTPC&#111;ntrolEdit in CommandBar Accel bug : fixed. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=576&amp;PID=1482&amp;title=cxtpcontroledit-in-commandbar-accel-bug#1482</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 576<br /><strong>Posted:</strong> 29 March 2004 at 12:22am<br /><br />fixed.]]>
   </description>
   <pubDate>Mon, 29 Mar 2004 00:22:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=576&amp;PID=1482&amp;title=cxtpcontroledit-in-commandbar-accel-bug#1482</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPC&#111;ntrolEdit in CommandBar Accel bug : The current implementation of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=576&amp;PID=1478&amp;title=cxtpcontroledit-in-commandbar-accel-bug#1478</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=350">vladsch</a><br /><strong>Subject:</strong> 576<br /><strong>Posted:</strong> 28 March 2004 at 10:26am<br /><br /><P>The current implementation of the command bars does not pre-translate messages that are needed by the CEdit control in a CXTPControlEdit. This bug applies to all CEdit controls in toolbars and menus, including the Caption edit box in the customize menu mode.</P><P>The problem arises if the keys used by CEdit (left, right, backspace, delete, Ctrl-z, Ctrl-y, etc.) are mapped to command IDs in the accelerator table for&nbsp;use&nbsp;by the application. These commands are translated and passed to CEdit which ignores them. </P><P>To duplicate the bug, modify the CustomThemes sample by adding entries to the Accelerator table in resources for the Return, Backspace or any other keys used by an Edit box during editing. Run the application, click on the edit box in the command bar and try to use the mapped edit keys. Keys will be ignored.</P><P>The solution is to add the following code to <BR>CXTPCommandBars::PreTranslateFrameMessage(MSG* pMsg) which will bypass the application accelerator table when a CEdit control has focus: </P><P><table width="99%"><tr><td><pre class="BBcode"><BR>BOOL CXTPCommandBars::PreTranslateFrameMessage(MSG* pMsg)<BR>{<BR>&nbsp;&nbsp;&nbsp; if (!XTPMouseManager()-&gt;IsMouseLocked() &amp;&amp; !XTPMouseManager()-&gt;IsTrackedLock(0))<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . . .<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // omitted for brevity<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; . . .<BR>&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp; // see if the current control is an edit box<BR>&nbsp;&nbsp;&nbsp;&nbsp;if (((pMsg-&gt;message == WM_KEYDOWN || pMsg-&gt;message == WM_KEYUP)<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &amp;&amp; (pMsg-&gt;wParam != VK_RETURN &amp;&amp; pMsg-&gt;wParam != VK_TAB))<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; || pMsg-&gt;message == WM_CHAR<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; )<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CWnd* pWnd = CWnd::GetFocus();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (pWnd &amp;&amp; pWnd-&gt;IsKindOf(RUNTIME_CLASS(CXTPEdit)))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; TranslateMessage(pMsg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; DispatchMessage(pMsg);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return TRUE;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }</P><P>&nbsp;&nbsp;&nbsp; . . .<BR>&nbsp;&nbsp;&nbsp; // omitted for brevity<BR>&nbsp;&nbsp;&nbsp; . . .<BR>&nbsp;&nbsp;&nbsp; return nReturn;<BR>}<BR></pre></td></tr></table></P><P>&nbsp;</P><span style="font-size:10px"><br /><br />Edited by vladsch</span>]]>
   </description>
   <pubDate>Sun, 28 Mar 2004 10:26:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=576&amp;PID=1478&amp;title=cxtpcontroledit-in-commandbar-accel-bug#1478</guid>
  </item> 
 </channel>
</rss>