<?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 : WM_KEYUP not handled in Property Grid Edits</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : WM_KEYUP not handled in Property Grid Edits]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 14:24:16 +0000</pubDate>
  <lastBuildDate>Tue, 07 Oct 2008 09:54:57 +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=12325</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[WM_KEYUP not handled in Property Grid Edits : Yes. ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41723&amp;title=wm-keyup-not-handled-in-property-grid-edits#41723</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 07 October 2008 at 9:54am<br /><br />Yes.]]>
   </description>
   <pubDate>Tue, 07 Oct 2008 09:54:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41723&amp;title=wm-keyup-not-handled-in-property-grid-edits#41723</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi Oleg,  Thanks for the suggestion.  It...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41705&amp;title=wm-keyup-not-handled-in-property-grid-edits#41705</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 07 October 2008 at 2:44am<br /><br />Hi Oleg,<br /><br />Thanks for the suggestion.<br /><br />It wouldn't work for our controls as they're not all Edits, we have various other kind of windows, controls, popups, etc... that have to eventually catch the key messages (or not) depending their own status and context... that the main CWinApp::PreTranslateMessage() doesn't know anything about.<br /><br />But that may work for you Edits. Are all items having key input in a property grid of class EDIT ?<br /><br />Thanks again<br /><br />Dominique]]>
   </description>
   <pubDate>Tue, 07 Oct 2008 02:44:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41705&amp;title=wm-keyup-not-handled-in-property-grid-edits#41705</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Don&amp;#039;t you think its easy...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41702&amp;title=wm-keyup-not-handled-in-property-grid-edits#41702</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 07 October 2008 at 2:37am<br /><br />Don't you think its easy to change code of your PreTranslateMessage&nbsp; than all Edit box that you can have ??<DIV>:)</DIV><DIV>&nbsp;</DIV><DIV>Some hints:</DIV><DIV>&nbsp;</DIV><DIV>TCHAR szClass&#091;10&#093;;<BR>&nbsp;&nbsp;CWnd* pWndFocus = GetFocus();<BR>&nbsp;&nbsp;if (IsChild(pWndFocus) &amp;&amp; GetClassName(pWndFocus-&gt;m_hWnd, szClass, 10) &amp;&amp;<BR>&nbsp;&nbsp;&nbsp;(lstrcmpi(szClass, _T("EDIT")) == 0))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;return TRUE;<BR>&nbsp;&nbsp;}</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 07 Oct 2008 02:37:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41702&amp;title=wm-keyup-not-handled-in-property-grid-edits#41702</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi Oleg,  It&amp;#039;s quite simple,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41679&amp;title=wm-keyup-not-handled-in-property-grid-edits#41679</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 06 October 2008 at 10:17am<br /><br />Hi Oleg,<br /><br />It's quite simple, we have some code in CWinApp::PreTranslateMessage that triggers events for WM_KEYDOWN and WM_KEYUP.<br /><br />These events should not be triggered when any Edit Box has the focus and for this any Edit Box should catch WM_KEYDOWN and WM_KEYUP. We do this by overriding PreTranslateMessage for all our Edit Box. (Please see the code in my previous post).<br /><br />The problem is that Items in your PropertyGrid catch the WM_KEYDOWN but not the WM_KEYUP when typing in them so all WM_KEYUP are then caught by our CWinApp::PreTranslateMessage.<br /><br />So the question is: Is there a way for your controls to catch WM_KEYUP as well, so we don't have to override all your controls PreTranslateMessage to do the same as our ?<br /><br />Thanks in advance<br /><br />Dominique]]>
   </description>
   <pubDate>Mon, 06 Oct 2008 10:17:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41679&amp;title=wm-keyup-not-handled-in-property-grid-edits#41679</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi, I still not sure what you...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41673&amp;title=wm-keyup-not-handled-in-property-grid-edits#41673</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 06 October 2008 at 8:59am<br /><br />Hi,<DIV>I still not sure what you have in your code and why it doesn't work for you, so can't suggest something :( </DIV><DIV>If you attach some sample that show prolem we will find some solution :)</DIV>]]>
   </description>
   <pubDate>Mon, 06 Oct 2008 08:59:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41673&amp;title=wm-keyup-not-handled-in-property-grid-edits#41673</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi Oleg,  Well, after deeper search...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41666&amp;title=wm-keyup-not-handled-in-property-grid-edits#41666</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 06 October 2008 at 5:04am<br /><br />Hi Oleg,<br /><br />Well, after deeper search it appears that there's indeed no difference between Alpha Numbers and Numpad Numbers...<br /><br />... both generate a WM_KEYUP... and this is a problem for us as our Accelerators mechanism deals with KeyDown and KeyUp separately.<br /><br />All our custom controls that should prevent Accelerators to be triggered do implement a PreTranslateMessage() like this:<br /><br />/////////////////////////////////////////////////////////////////////////////<br />BOOL CItemEdit::PreTranslateMessage(MSG *pMsg)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// To bypass ExAccelerators<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pMsg-&gt;message == WM_KEYDOWN || pMsg-&gt;message == WM_KEYUP)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TranslateMessage(pMsg);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DispatchMessage(pMsg);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return TRUE;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return CRichEditCtrl::PreTranslateMessage(pMsg);<br />}<br /><br />This makes sure that when this Edit Box has the focus no WM_KEYDOWN AND WM_KEYUP are caught by the CWinApp::PreTranslateMessage().<br /><br />Is there any way we can do the same in your code... without recompiling it or making a special version ?<br /><br />At this point, this makes our app almost unusable...<br /><br />Thanks for your help.<br /><br />Dominique<br />]]>
   </description>
   <pubDate>Mon, 06 Oct 2008 05:04:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41666&amp;title=wm-keyup-not-handled-in-property-grid-edits#41666</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi,  Have to be something in...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41653&amp;title=wm-keyup-not-handled-in-property-grid-edits#41653</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 06 October 2008 at 2:37am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Have to be something in your code. PreTranslateMessage doesn't eat keys. Check what methods you override and what code can be reason.</DIV>]]>
   </description>
   <pubDate>Mon, 06 Oct 2008 02:37:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41653&amp;title=wm-keyup-not-handled-in-property-grid-edits#41653</guid>
  </item> 
  <item>
   <title><![CDATA[WM_KEYUP not handled in Property Grid Edits : Hi Oleg/All,  I&amp;#039;ve a problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41624&amp;title=wm-keyup-not-handled-in-property-grid-edits#41624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2440">dbrulhart</a><br /><strong>Subject:</strong> 12325<br /><strong>Posted:</strong> 03 October 2008 at 11:58am<br /><br />Hi Oleg/All,<br /><br />I've a problem with Property Grid Edits:<br /><br />If I type a number in a Property Grid Edit Item with the numeric keypad then both WM_KEYDOWN and WM_KEYUP are caught by the Edit and all is fine.<br /><br />But if I type a number with the alphanumeric side of the keyboard (1/!, 2/@, 3/#, etc...) then only the WM_KEYDOWN is caught and the WM_KEYUP is still generated and then caught by my CWinApp::PreTranslateMessage(), which purposely generates some action that have the consequence of loosing the focus of the Edit box.<br /><br />Is this a bug ? Or a intended feature ? And if yes can this be disabled ?<br /><br />Thanks for shedding some lights here.<br /><br />Best regards,<br /><br />Dominique]]>
   </description>
   <pubDate>Fri, 03 Oct 2008 11:58:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12325&amp;PID=41624&amp;title=wm-keyup-not-handled-in-property-grid-edits#41624</guid>
  </item> 
 </channel>
</rss>