<?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 : Yes! Found a ribbon bug!</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Yes! Found a ribbon bug!]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 13:37:31 +0000</pubDate>
  <lastBuildDate>Mon, 22 Nov 2010 08:38:51 +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=17371</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[Yes! Found a ribbon bug! : Hi,Thanks finally fixed. Actually...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=61482&amp;title=yes-found-a-ribbon-bug#61482</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 17371<br /><strong>Posted:</strong> 22 November 2010 at 8:38am<br /><br />Hi,<div><br></div><div>Thanks finally fixed. Actually you made very good reserch and we did it with your way:</div><div><br></div><div><br></div><div><div>BOOL CXTPMouseManager::IsRelated(HWND hWndParent, HWND hWnd) const</div><div>{</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>while (hWnd)</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>{</div><div><span ="Apple-tab-span" style="white-space:pre">		</span>if (hWnd == hWndParent)</div><div><span ="Apple-tab-span" style="white-space:pre">			</span>return TRUE;</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">		</span>hWnd = ::GetParent(hWnd);</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>}</div><div><br></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>return FALSE;</div><div>}</div></div><div><br></div><div>...</div><div><br></div><div>if ((nHtCode != HTERROR) &amp;&amp; ((nHtCode == HTCLIENT) || ::IsChild(pCommandBar-&gt;GetSafeHwnd(), hWndMouse) || <b>IsRelated(pCommandBar-&gt;GetSafeHwnd(), hWndMouse)))</b></div>]]>
   </description>
   <pubDate>Mon, 22 Nov 2010 08:38:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=61482&amp;title=yes-found-a-ribbon-bug#61482</guid>
  </item> 
  <item>
   <title><![CDATA[Yes! Found a ribbon bug! : Can you please fix this? ]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=61480&amp;title=yes-found-a-ribbon-bug#61480</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 17371<br /><strong>Posted:</strong> 22 November 2010 at 6:29am<br /><br />Can you please fix this?]]>
   </description>
   <pubDate>Mon, 22 Nov 2010 06:29:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=61480&amp;title=yes-found-a-ribbon-bug#61480</guid>
  </item> 
  <item>
   <title><![CDATA[Yes! Found a ribbon bug! : Oleg, do you follow me on this...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=60776&amp;title=yes-found-a-ribbon-bug#60776</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 17371<br /><strong>Posted:</strong> 08 October 2010 at 3:58pm<br /><br />Oleg, do you follow me on this one? Or do you need a sample?]]>
   </description>
   <pubDate>Fri, 08 Oct 2010 15:58:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=60776&amp;title=yes-found-a-ribbon-bug#60776</guid>
  </item> 
  <item>
   <title><![CDATA[Yes! Found a ribbon bug! :  XTP 13.4.1, Windows 7. I had...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=60682&amp;title=yes-found-a-ribbon-bug#60682</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 17371<br /><strong>Posted:</strong> 04 October 2010 at 2:30pm<br /><br /><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><DIV><FONT color=#000000>XTP 13.4.1, Windows 7. </FONT><FONT color=#000000>I had to struggle a bit to catch this one!</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>I have a CDateTimeCtrl inside a CXTPControlCustom control.</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>1) Minimize the ribbon.</FONT></DIV><DIV><FONT color=#000000>2) Click on the datepicker dropdown button. The well-known date-picker popup is shown.</FONT></DIV><DIV><FONT color=#000000>3) Now select a date. WM_LBUTTONDOWN will be captured - and trigger a call to SetPopuped(-1).</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>Clearly this is wrong! I didn't click what I expect "outside ribbon".&nbsp;What happened here, is that your mouse-hook interpreted this WM_LBUTTONDOWN as a "click in void". We need an extra check somewhere in CXTPMouseManager::PreTranslateMouseEvents.</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>Here's the error:</FONT></DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> ((</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>nHtCode</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> != </FONT></FONT><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas>HTERROR</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>) &amp;&amp; ((</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>nHtCode</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> == </FONT></FONT><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas>HTCLIENT</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>) || ::</FONT></FONT><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas>IsChild</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>(</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>pCommandBar</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>-&gt;</FONT></FONT><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas>GetSafeHwnd</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>(), </FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndMouse</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#000000>)))</DIV><DIV><DIV>{</DIV><DIV>&nbsp;</DIV><DIV></FONT><FONT color=#808080>hWndMouse </FONT><FONT color=#000000>equals </FONT><FONT color=#a000a0>HTNOWHERE</FONT><FONT color=#000000>. And the IsChild-call fails due to this:</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>GetParent(hWndMouse) == "DropDown</FONT><FONT color=#000000>" </FONT><FONT color=#ff0000>&lt;-- bummer!</FONT></DIV><DIV><FONT color=#000000>GetParent("DropDown") == "XTPPopupBar"</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>Thus, what you need is to <strong>iterate</strong> upwards, and see if you ever hit that XTPPopupBar window!</FONT></DIV><DIV><FONT color=#000000></FONT>&nbsp;</DIV><DIV><FONT color=#000000>Something like this:</FONT></DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas></FONT></FONT></FONT>&nbsp;</DIV><DIV>BOOL CXTPCommandBar::IsWindowRelated(HWND <FONT color=#000000><FONT color=#808080>hWnd</FONT></FONT><FONT color=#0000ff>)</FONT></DIV><DIV>{</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp; HWND</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> = ::</FONT></FONT><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas>GetParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWnd</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;&nbsp; while</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;&nbsp; {</FONT></FONT></DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> == </FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>m_hWnd</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>)</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;</FONT></FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#0000ff><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>return </FONT></FONT></FONT><FONT color=#a000a0>TRUE</FONT>;</FONT></FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT></FONT></DIV><DIV>&nbsp;&nbsp; &nbsp;&nbsp; <FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> = ::</FONT></FONT><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas>GetParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>hWndParent</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;&nbsp; }</FONT></FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp; return <FONT color=#a000a0>FALSE</FONT><FONT color=#808080>;</FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>}</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp;<DIV>if<FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> ((</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>nHtCode</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> != </FONT></FONT><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas>HTERROR</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>) &amp;&amp; ((</FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>nHtCode</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas> == </FONT></FONT><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas><FONT color=#a000a0 size=2 face=C&#111;nsolas>HTCLIENT</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>) || </FONT></FONT><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas><FONT color=#808080 size=2 face=C&#111;nsolas>pCommandBar</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>-&gt;</FONT></FONT><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas><FONT color=#880000 size=2 face=C&#111;nsolas>IsWindowRelated</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT color=#000000 size=2 face=C&#111;nsolas>(<FONT color=#808080>hWndMouse</FONT>)</FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas><FONT color=#000000>)))</DIV><DIV>{</DIV><DIV>&nbsp;</DIV><DIV>Please provide a fix a la codejock style so that I can update my source code a.s.a.p!</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV></FONT></FONT></FONT></DIV></FONT></FONT></FONT></FONT></FONT></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Mon, 04 Oct 2010 14:30:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17371&amp;PID=60682&amp;title=yes-found-a-ribbon-bug#60682</guid>
  </item> 
 </channel>
</rss>