<?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 : Bug in CXTPPopupBar</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : Bug in CXTPPopupBar]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 14 Jun 2026 12:14:50 +0000</pubDate>
  <lastBuildDate>Thu, 04 Jan 2007 09:37:48 +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=5966</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[Bug in CXTPPopupBar : Heh, I made a stupid copy and...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18806&amp;title=bug-in-cxtppopupbar#18806</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 5966<br /><strong>Posted:</strong> 04 January 2007 at 9:37am<br /><br />Heh, I made a stupid copy and paste error in the code above.&nbsp; If you look closely, there is an obvious error in #2.&nbsp; <br><br><font color="#0000ff" face="Courier New, Courier, mono">static CRect AFX_CDECL CXTPDrawHelpers::GetScreenArea(const POINT&amp; point)<br>{<br>&nbsp; return CXTPMultiMonitor::s_monInstance.GetScreenArea(pWnd-&gt;GetSafeHwnd());<br>}</font><br><br>Should be changed to:<br><br><br><font color="#0000ff" face="Courier New, Courier, mono">static CRect AFX_CDECL CXTPDrawHelpers::GetScreenArea(const POINT&amp; point)<br>{<br>&nbsp; return CXTPMultiMonitor::s_monInstance.GetScreenArea(point);<br>}<br><br></font><br>Thanks<br>&nbsp;- fishy<br><br><br>]]>
   </description>
   <pubDate>Thu, 04 Jan 2007 09:37:48 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18806&amp;title=bug-in-cxtppopupbar#18806</guid>
  </item> 
  <item>
   <title><![CDATA[Bug in CXTPPopupBar : Hello, Yes, thank you, we included...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18782&amp;title=bug-in-cxtppopupbar#18782</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 5966<br /><strong>Posted:</strong> 04 January 2007 at 2:15am<br /><br />Hello,<DIV>Yes, thank you, we included it.</DIV>]]>
   </description>
   <pubDate>Thu, 04 Jan 2007 02:15:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18782&amp;title=bug-in-cxtppopupbar#18782</guid>
  </item> 
  <item>
   <title><![CDATA[Bug in CXTPPopupBar : The following changes were made...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18772&amp;title=bug-in-cxtppopupbar#18772</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 5966<br /><strong>Posted:</strong> 03 January 2007 at 2:53pm<br /><br />The following changes were made to fix the bug:<br><br>1. Add the following method to the <b>CXTPMultiMonitor </b>class:<br><br><font color="#0000ff" face="Courier New, Courier, mono">CRect CXTPMultiMonitor::GetScreenArea(POINT ptScreenCoords)</font><br><font color="#0000ff" face="Courier New, Courier, mono">{</font><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; MONITORINFO info;</font><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; HMONITOR hMonitor = InitMultipleMonitorStubs() ? m_pfnMonitorFromPoint(ptScreenCoords, 0) : 0;</font><br><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; if (GetMonitorInfo(hMonitor, &amp;info))</font><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; {</font><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; return info.rcMonitor;</font><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; }</font><br><br><font color="#0000ff" face="Courier New, Courier, mono">&nbsp; return CRect(0, 0, ::GetSystemMetrics(SM_CXSCREEN), ::GetSystemMetrics(SM_CYSCREEN));</font><br><font color="#0000ff" face="Courier New, Courier, mono">}</font><br><br><br>2. Add the following method to the <b>CXTPDrawHelpers </b>class:<br><br><font color="#0000ff" face="Courier New, Courier, mono">static CRect AFX_CDECL CXTPDrawHelpers::GetScreenArea(const POINT&amp; point)<br>{<br>&nbsp; return CXTPMultiMonitor::s_monInstance.GetScreenArea(pWnd-&gt;GetSafeHwnd());<br>}</font><br><br>&nbsp;<br>3. Use the following code in the <b>CXTPPopupBar::CalculatePopupRect()</b> method to calculate the “work area” rectangle used to determine if the popup needs to be relocated:<br><br>&nbsp;<br><font color="#0000ff">CRect CXTPPopupBar::CalculatePopupRect(CSize sz)<br>{<br>&nbsp; RECT rcWork = m_rcExclude.IsRectEmpty() ? CXTPDrawHelpers::GetWorkArea(m_ptPopup) :<br>&nbsp;&nbsp;&nbsp; CXTPDrawHelpers::GetWorkArea(m_rcExclude);<br><br>&nbsp; RECT screenRect = CXTPDrawHelpers::GetScreenArea(m_ptPopup);<br><br>&nbsp; // If point is on the screen, but not in the work area, then the point<br>&nbsp; // must be inside an AppBar.<br>&nbsp; if ( PtInRect(&amp;screenRect,m_ptPopup) &amp;&amp; !PtInRect(&amp;rcWork,m_ptPopup) )<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; rcWork = screenRect;<br>&nbsp; }<br>&nbsp; <br>&nbsp; ...<br>&nbsp;<br></font><br>Any chance we could get these changes integrated into a new release at some point?&nbsp; It would be extremely helpful.&nbsp;&nbsp; <br><br>Thanks,<br>fishy.<br><br><p ="Ms&#111;normal"><font color="green" face="Courier New" size="2"><span style="font-size: 10pt; color: green; font-family: 'Courier New';"></span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; color: navy; font-family: Arial;"><o:p></o:p></span></font></p>]]>
   </description>
   <pubDate>Wed, 03 Jan 2007 14:53:31 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18772&amp;title=bug-in-cxtppopupbar#18772</guid>
  </item> 
  <item>
   <title><![CDATA[Bug in CXTPPopupBar : There is a bug in the CXTPPopupBar::CalculatePopupRect...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18742&amp;title=bug-in-cxtppopupbar#18742</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1568">fishy</a><br /><strong>Subject:</strong> 5966<br /><strong>Posted:</strong> 02 January 2007 at 4:46pm<br /><br />There is a bug in the CXTPPopupBar::CalculatePopupRect method that shows itself when the drop-down portion of a menu is displayed when the main window is an AppBar window. The method CXTPPopupBar::CalculatePopupRect calculates a rectangle for the window that lies within the desktop’s work area (see CXTPDrawHelpers::GetWorkArea() and ::SystemParametersInfo(SPI_GETWORKAREA,…) ).&nbsp; This is fine except for the case when the popup window is associated with a parent window which itself is an AppBar, which by definition lies outside the work area when AppBars are set to stay on top of other windows (see the “Keep the taskbar on top of other windows” option on the “Taskbar and Start Menu Properties” dialog).&nbsp; In that case, the drop-down portion of the menu is displayed OUTSIDE the parent window.&nbsp; A case should be added to CXTPPopupBar::CalculatePopupRect() to detect the case where the parent window is entirely outside the work area, in which case the popup window should kept inside the screen rectangle, NOT the work area rectangle.<br><br>This is a pretty awful bug to any application that uses menus and is itself an AppBar.&nbsp;&nbsp; Anyway we could get a fix for it?<br><br>- fishy<br>]]>
   </description>
   <pubDate>Tue, 02 Jan 2007 16:46:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5966&amp;PID=18742&amp;title=bug-in-cxtppopupbar#18742</guid>
  </item> 
 </channel>
</rss>