<?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 : CXTPControlEditCtrl::OnKeyDown</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : CXTPControlEditCtrl::OnKeyDown]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 20:13:01 +0000</pubDate>
  <lastBuildDate>Mon, 13 Dec 2021 15:47:49 +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=24249</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[CXTPControlEditCtrl::OnKeyDown : This seems slightly wrong but...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24249&amp;PID=78342&amp;title=cxtpcontroleditctrlonkeydown#78342</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24249<br /><strong>Posted:</strong> 13 December 2021 at 3:47pm<br /><br /><div>This seems slightly wrong but I finally overrode OnHookKeyDown and called the CXTPControlEdit::OnHookKeyDown. If it returns FALSE (not FALSE_EXIT - A slight "misuse" of BOOL) I see if nChar was VK_RETURN and if so, I called GetEditCtrl and then GetControlEdit and called OnExecute directly.</div><div><br></div><div>I still can't quite fathom what this hooker returning FALSE is for or why the code isn't executing without me jumping thru these hoops. Its like the buddy button is a must. Without it and this new code, I wouldn't have been able to get the user to hit return to perform my action.</div><div><br></div><div>I added the buddy button first and did not avoid that code when I found return not working. I did search thru the CJ edit code to see if the buddy button had anything to do with return not working but I didn't see anything obvious so I left that code as is. Besides, I want both a buddy click or a return to execute my code.<br></div>]]>
   </description>
   <pubDate>Mon, 13 Dec 2021 15:47:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24249&amp;PID=78342&amp;title=cxtpcontroleditctrlonkeydown#78342</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPControlEditCtrl::OnKeyDown : I want the CXTPControlEditCtrl...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24249&amp;PID=78341&amp;title=cxtpcontroleditctrlonkeydown#78341</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24249<br /><strong>Posted:</strong> 13 December 2021 at 2:45pm<br /><br /><div>I want the CXTPControlEditCtrl to execute if the user presses the return key. I found CXTPControlEditCtrl::OnKeyDown does just that. But it isn't even called in my case. I have added a CXTPControlEdit on our ribbon and it implements OnHookKeyDown. In that code it traps VK_RETURN and VK_CHAR and returns FALSE.</div><div><br></div><div>What do I do to get the CXTPControlEditCtrl contol to get the OnKeyDown message handler to execute? Key down is in it's message map. So is mouse move and that fires when I move the mouse over the edit control.</div><div><br></div><div>I have my own CXTPControlEditCtrl subclass. I added an OnKeyDown handler. It is called but not for VK_RETURN. I think that hooker being used is stopping the control edit ctrl from getting the message it needs and deserves.</div><div><br></div><div>Don't know if it is the hooker but I have to be careful where I set breakpoints in OnHookKeyDown - visual studio break point trips and then VS quits responding and I have to kill it via task manager.<br></div>]]>
   </description>
   <pubDate>Mon, 13 Dec 2021 14:45:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24249&amp;PID=78341&amp;title=cxtpcontroleditctrlonkeydown#78341</guid>
  </item> 
 </channel>
</rss>