<?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 : CXTPPropertyGridInplaceList</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : CXTPPropertyGridInplaceList]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 05:58:48 +0000</pubDate>
  <lastBuildDate>Thu, 14 Aug 2014 17:56:41 +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=22386</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[CXTPPropertyGridInplaceList : I modified the source code myself...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22386&amp;PID=72721&amp;title=cxtppropertygridinplacelist#72721</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8747">Damian</a><br /><strong>Subject:</strong> 22386<br /><strong>Posted:</strong> 14 August 2014 at 5:56pm<br /><br />I modified the source code myself and rebuilt the libraries. &nbsp;It works now.<div><br></div><div>Here's the fix for&nbsp;<span style="line-height: 1.4; : rgb248, 248, 252;">Xtreme ToolkitPro v16.2.0...</span></div><div><span style="line-height: 1.4; : rgb248, 248, 252;"><br></span></div><div><span style=": rgb248, 248, 252;">On line 100 of XTPPropertyGridInplaceList.h, add this:</span></div><div><span style=": rgb248, 248, 252;"><b>BOOL PreTranslateMessage(MSG* pMsg);</b></span></div><div><span style=": rgb248, 248, 252;"><b><br></b></span></div><div><span style=": rgb248, 248, 252;">In the file&nbsp;XTPPropertyGridInplaceList.cpp&nbsp;add this anywhere you like:</span></div><div><span style=": rgb248, 248, 252;"><div><b>BOOL CXTPPropertyGridInplaceList::PreTranslateMessage(MSG* pMsg)</b></div><div><b>{</b></div><div><b><span ="Apple-tab-span" style="white-space:pre">	</span>return (pMsg-&gt;message == WM_KEYDOWN &amp;&amp; IsDialogMessage(pMsg));</b></div><div><b>}</b></div><div><br></div></span></div>]]>
   </description>
   <pubDate>Thu, 14 Aug 2014 17:56:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22386&amp;PID=72721&amp;title=cxtppropertygridinplacelist#72721</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPPropertyGridInplaceList : I&amp;#039;m usingXtreme ToolkitPro...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22386&amp;PID=72720&amp;title=cxtppropertygridinplacelist#72720</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8747">Damian</a><br /><strong>Subject:</strong> 22386<br /><strong>Posted:</strong> 14 August 2014 at 12:27am<br /><br />I'm using&nbsp;Xtreme ToolkitPro v16.2.0. &nbsp;I've found a problem and was hoping someone could confirm whether or not there is a fix in a later version, or at all.<div><br></div><div><b>Here's the setup:</b></div><div><br></div><div><span style="line-height: 1.4;">The main view of my application is a list view in report mode. &nbsp;When you double click on a list view item, a property sheet is run. &nbsp;Each property page has a property grid on it.</span></div><div><br></div><div>Some items in the various&nbsp;property grids&nbsp;have a list of strings in them, hence they have an in-place button that when clicked drops a list box down to display the strings to choose from.</div><div><br></div><div>There is an accelerator key bound to the enter key in the CWinApp derived object.</div><div><br></div><div><b>Here's the problem:</b></div><div><br></div><div>For a property grid item that has a list of strings, drop the list box down using the in-place button. &nbsp;Next, use the up/down arrow keys to select a list box item. &nbsp;Then tap the enter key -- the key press goes to the bound accelerator key, not the list box.</div><div><br></div><div>Interestingly, if you do not drop the list down, but instead just click the&nbsp;property&nbsp;grid item to set the focus, then use the up/down/enter key combo, the message is not routed the accelerator key.</div><div><br></div><div><b>Here's what debugging the&nbsp;<span style="line-height: 1.4;">Xtreme ToolkitPro revealed:</span></b></div><div><span style="line-height: 1.4;"><br></span></div><div>The edit box in a property grid item is an instance of&nbsp;CXTPPropertyGridInplaceEdit.&nbsp;<span style="line-height: 1.4;">The list box in a property grid item is an instance of&nbsp;CXTPPropertyGridInplaceList.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">Both classes have a&nbsp;</span><span style="line-height: 1.4;">OnKeyDown method in their message maps.&nbsp;</span><span style="line-height: 1.4;">Both classes look for&nbsp;</span><span style="line-height: 1.4;">VK_RETURN and handle it appropriately.</span></div><div><br></div><div>The CXTPPropertyGridInplaceEdit class has a&nbsp;PreTranslateMessage override.</div><div>The CXTPPropertyGridInplaceList class does not have a&nbsp;PreTranslateMessage override.</div><div><br></div><div><span style="line-height: 1.4;">If you just click the property grid item and do not drop down the list, a breakpoint in the&nbsp;</span>CXTPPropertyGridInplaceEdit::OnKeyDown method reveals sure enough that up, down and enter key presses end up there.</div><div><br></div><div>However, if you put a breakpoint in the&nbsp;CXTPPropertyGridInplaceList::OnKeyDown method, the up and down key presses hit the breakpoint, but a press of the enter key does not. Instead, it ends up being routed to the accelerator key.</div><div><br></div><div>The reason appears to be the lack of a&nbsp;<span style="line-height: 1.4;">PreTranslateMessage override in the&nbsp;</span><span style="line-height: 1.4;">CXTPPropertyGridInplaceList class.</span></div><div><span style="line-height: 1.4;"><br></span></div><div>If you look at the guts of the&nbsp;AfxInternalPumpMessage method in MFC, then you can see that it calls&nbsp;AfxPreTranslateMessage. &nbsp;This ends up walking the parent/child hierarchy of the inheritance tree looking for implementations of&nbsp;<span style="line-height: 1.4;">PreTranslateMessage.&nbsp;</span></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">For the use case of enter being pressed in the </span><span style="line-height: 1.4;">CXTPPropertyGridInplaceEdit</span><span style="line-height: 1.4;">&nbsp;class, this works because&nbsp;</span><span style="line-height: 1.4;">CXTPPropertyGridInplaceEdit&nbsp;</span><span style="line-height: 1.4;">has as override that calls IsDialogMessage, which does the right thing.</span></div><div><span style="line-height: 1.4;"><br></span></div><div><div><span style="line-height: 1.4;">For the use case of enter being pressed in the&nbsp;</span>CXTPPropertyGridInplaceList&nbsp;<span style="line-height: 1.4;">class, there is no&nbsp;</span><span style="line-height: 1.4;">PreTranslateMessage override, so the work falls to the parent class&nbsp;</span>CMDIFrameWnd, whose&nbsp;<span style="line-height: 1.4;">PreTranslateMessage calls TranslateAccelerator and hence the behaviour I'm seeing.</span></div></div><div><span style="line-height: 1.4;"><br></span></div><div><span style="line-height: 1.4;">So I ask again, can someone&nbsp;</span><span style="line-height: 1.4;">confirm whether or not there is a fix in a later version of the&nbsp;</span><span style="line-height: 1.4;">Xtreme ToolkitPro</span><span style="line-height: 1.4;">, or at all?</span></div>]]>
   </description>
   <pubDate>Thu, 14 Aug 2014 00:27:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22386&amp;PID=72720&amp;title=cxtppropertygridinplacelist#72720</guid>
  </item> 
 </channel>
</rss>