<?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 : Strange Ribbon Group layout on 4k w/ scaling</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Strange Ribbon Group layout on 4k w/ scaling]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 00:20:56 +0000</pubDate>
  <lastBuildDate>Fri, 10 Jun 2022 07:54:14 +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=24292</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[Strange Ribbon Group layout on 4k w/ scaling : Hi,Maybe your problem is same...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24292&amp;PID=78453&amp;title=strange-ribbon-group-layout-on-4k-w-scaling#78453</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1263">Fredrik</a><br /><strong>Subject:</strong> 24292<br /><strong>Posted:</strong> 10 June 2022 at 7:54am<br /><br />Hi,&nbsp;<br><br>Maybe your problem is same as&nbsp;<a href="https://forum.codejock.com/dpi-issues-with-png-ic&#111;ns-and-xtp-20-1_topic24214.html" target="_blank" rel="nofollow">DPI issues with PNG icons and XTP 20.1 - Codejock Developer Community</a>? It doesn't really sound like that, but who knows - there's an error in GetLargeIconSize anyway.<br><br>Try changing this function:<br><br><pre ="BBcode" style="width: 1146.19px; : rgb248, 248, 252;">CSize CXTPCommandBar::GetLargeIconSize(BOOL bAutoSize) const<div>{</div><div>...</div><div>CSize sz = m_szIcons != CSize(0) ? m_szIcons : (pCommandBars-&gt;m_pOptions-&gt;szIcons != CSize(0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;? pCommandBars-&gt;m_pOptions-&gt;szIcons</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: bAutoSize ? XTPSystemMetrics()-&gt;GetSmallIconSize() // &lt;--</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: XTP_UNDPI(XTPSystemMetrics()-&gt;GetSmallIconSize())); // &lt;--</div><div><br></div><div>...</div></pre>]]>
   </description>
   <pubDate>Fri, 10 Jun 2022 07:54:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24292&amp;PID=78453&amp;title=strange-ribbon-group-layout-on-4k-w-scaling#78453</guid>
  </item> 
  <item>
   <title><![CDATA[Strange Ribbon Group layout on 4k w/ scaling : Normally when I have a RibbonGroup...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24292&amp;PID=78441&amp;title=strange-ribbon-group-layout-on-4k-w-scaling#78441</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9556">garrettd</a><br /><strong>Subject:</strong> 24292<br /><strong>Posted:</strong> 31 May 2022 at 5:59pm<br /><br />Normally when I have a RibbonGroup with xtpButtonIconAndCaption controls, the controls are drawn three to a column within the group. However, on a 4k monitor at 200% scaling, only two controls are drawn to a column, resulting in a lot of wasted space. I've traced the problem down to&nbsp;CXTPRibbonGroup::OnCalcDynamicSize(CDC* pDC) in Source\Ribbon\XTPRibbonGroup.cpp. The variable nResultHeight is calculated based on the edit height (x3) plus some padding that winds up being XTP_DPI_Y(1). However, when looping through controls, the control height is calculated based on the control text font. At 4k resolution and 200% scaling, the discrepancy between the edit height and the font height makes OnCalcDynamicSize() think it can only fit two controls in a column.<div><br></div><div>Has anyone run into this issue before and found a good fix? We are hesitant to change the font size right now, so I'm thinking it might be best to adjust the padding in the calculation for nResultHeight instead. CalcGroupsHeight() adds XTP_DPI_Y(10) and then OnCalcDynamicSize() subtracts XTP_DPI(9) for the nResultHeight calculation - does anyone know where these values came from? Potential side effects for subtracting less?</div><div><br></div><div>Thanks,</div><div>Garrett</div>]]>
   </description>
   <pubDate>Tue, 31 May 2022 17:59:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24292&amp;PID=78441&amp;title=strange-ribbon-group-layout-on-4k-w-scaling#78441</guid>
  </item> 
 </channel>
</rss>