<?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 : DPI Scaling Related ContextMenu Drawing Problem</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : DPI Scaling Related ContextMenu Drawing Problem]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 21:06:42 +0000</pubDate>
  <lastBuildDate>Thu, 16 Mar 2023 11:35:29 +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=24372</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[DPI Scaling Related ContextMenu Drawing Problem : Hello Codejock Team,we encountered...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24372&amp;PID=78656&amp;title=dpi-scaling-related-contextmenu-drawing-problem#78656</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9564">mschumi_41</a><br /><strong>Subject:</strong> 24372<br /><strong>Posted:</strong> 16 March 2023 at 11:35am<br /><br /><div>Hello Codejock Team,</div><div>we encountered a context menu drawing problem. We are currently the Xtreme Toolkit Pro version 20.3.0.</div><div>Here is the reproduction:</div><div>- Occurs only in a multi-monitor setup; monitor resolution does not matter (both monitors can have the same display resolution; in my case 1920 x 1080)</div><div>- The scaling (the percentage value "size of text, apps, and other items) must be set different to reproduce the problem (in my setup: main monitor 100%, secondary monitor 125%).</div><div>- Start the program; it is opened on the main monitor<br></div><div>- Open a dialog where a context menu can be shown when the right mouse button is clicked upon the dialog<br></div><div>- Drag the dialog to the secondary monitor; as soon as more than half the dialog is dragged to the other monitor, it enlarges (because secondary monitor's scaling is on 125%)</div><div>- Now right-click on the dialog</div><div>- Here finally comes the problem</div><div>&nbsp;&nbsp; - the context menu's shadows (right and bottom) are drawn in the correct place and size</div><div>&nbsp;&nbsp; - <b>however, the context menu's contents is drawn more to the upper left and in a smaller size</b> that matches the main monitor's scaling</div><div><br></div><div><br></div><div>I checked what is called and found the following:</div><div>- our code looks as follows</div><div><br></div><div>with pCommandBars= nullptr or the MainFrame's command bars:<br></div><div>CXTPPopupBar* pPopup = CXTPPopupBar::CreatePopupBar(pCommandBars);<br>pPopup.LoadMenu(pMenu)<br></div><div>CXTPCommandBars::TrackPopupMenu(pPopup, flags, inX, inY, /*pWnd=*/nullptr, /*rcExclude=*/nullptr, /*pWndOwner=*/nullptr);</div><div><br></div><div>- on the XTP side is called:<br></div><div>- CXTPPopupBar::Popup(CXTPControlPopup* pControlPopup) with<br></div><div>- Animate (here something goes wrong)<br></div><div>&nbsp;&nbsp; paintDC.BitBlt(0, 0, rcClient.Width(), rcClient.Height(), pDC, rcWindow.left, &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; rcWindow.top, SRCCOPY);</div><div>&nbsp;&nbsp; ...</div><div>&nbsp;&nbsp; GetPaintManager()-&gt;Animate(&amp;paintDC, &amp;animationDC, rcClient, animationType);</div><div>- and for the Shadows (works correctly)<br></div><div>&nbsp;&nbsp; pPaintManager-&gt;GetShadowManager()-&gt;SetShadow(this, m_rcExclude, m_bRecursePopup ? 1 : 0);<br></div><div><br></div><div>- I changed one of the Codejock sample programs (CommandBars\HelpContext) and made the AboutDlg to have such a context menu. This reproduces the problem. <br></div><div>- I can send you the modified HelpContext sources&nbsp; if it is needed</div><div><br></div><div>That is all for the moment; is this a bug or am I doing something wrong?</div><div><br></div><div>Thank you in advance and best regards,</div><div>Michael<br></div>]]>
   </description>
   <pubDate>Thu, 16 Mar 2023 11:35:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24372&amp;PID=78656&amp;title=dpi-scaling-related-contextmenu-drawing-problem#78656</guid>
  </item> 
 </channel>
</rss>