<?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 : Status bar icon size issues</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : Status bar icon size issues]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 00:08:37 +0000</pubDate>
  <lastBuildDate>Wed, 15 Jun 2022 13:17:19 +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=24297</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[Status bar icon size issues : Just an update. I calledEnableDpiBitmapScaling(TRUE);...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24297&amp;PID=78456&amp;title=status-bar-icon-size-issues#78456</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24297<br /><strong>Posted:</strong> 15 June 2022 at 1:17pm<br /><br />Just an update. I called&nbsp;EnableDpiBitmapScaling(TRUE); After that, the status bar icons are drawn at the correct size though some of they look like crap due to AlphaBlend not supportig halftone (which isn't that great in and of itself for all images).<div><br></div><div>So, great! Except ... now CodeJock is scaling ribbon icons too. My desktop is 4k at 200%. I create 64x64 icons and CodeJock gets those icons and then calls the AdjustDPIIconSize and gets back 76x76.</div><div><br></div><div>The result is that the buttons draw right over text (when caption below is used as the style), or over the "drop" arrow drawn when a control is a split button dropdown. The call to GetButtonSize goes to the ribbon bar and it is using some "edit" control height which in my case is returned as 41. Then DrawControlToolbarParent changes the size using this weirdness:</div><div><br></div><div><div><span style="white-space:pre">		</span>szButton = CSize(max(XTP_DPI_X(42), GetControlHeight() * 2 - XTP_DPI_X(4)),</div><div><span style="white-space:pre">						</span> m_nEditHeight &gt; 0 ? m_nEditHeight * 3</div><div><span style="white-space:pre">										</span>&nbsp; &nbsp;: GetSplitDropDownHeight() + szIcon.cy + XTP_DPI_Y(7));</div><div><span style="white-space:pre">	</span>}</div></div><div>}</div><div><br></div><div>and the size ends up 84x123 for a button that has caption below set (the case I stepped thru was for such a button style). That size just isn't suffiient to draw everything. But really, the issue was the auto scaling code just isn't meant to be used when one provides images of the right sizes.</div><div><br></div><div>Looks like I have to edit the status bar pane drawing code to go back to what it used to be as there is no way we can live with having our icons scaled by Codejock in all cases.</div>]]>
   </description>
   <pubDate>Wed, 15 Jun 2022 13:17:19 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24297&amp;PID=78456&amp;title=status-bar-icon-size-issues#78456</guid>
  </item> 
  <item>
   <title><![CDATA[Status bar icon size issues : I have version 20.1  When running...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24297&amp;PID=78455&amp;title=status-bar-icon-size-issues#78455</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 24297<br /><strong>Posted:</strong> 15 June 2022 at 11:45am<br /><br /><p style="margin:0in;font-family:Calibri;font-size:11.0pt">I have version 20.1</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt"><br></p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">When running on a 4kmonitor scaled at 200%, the status bar is only drawing small icons. We createicons that are 16x16, 32x32 and 64x64. When running with the DPI set to 100%,CodeJock paints the 16x16 icon when drawing the CXTPStatusBarPane entries. Thebutton size itself is 16x16 too.</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">Now scale thedesktop to 200%. Codejock still draws the 16x16 icon, but the button size is32x32.&nbsp;<span style="font-size: 11pt;">This is aregression.</span></p><p style="margin:0in;font-family:Calibri;font-size:11.0pt"><span style="font-size: 11pt;"><br></span></p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">The cause for thisis that Codejock is mixing code that uses XTP_DPI_X inCXTPStatusBarPaintManager::DrawStatusBarPaneEntry with calls toCXTPPaintManager::AdjustDpiIconSize. The latter returns 16x16. In earlierversions of CodeJock, code scaled the Icon Extent using XTP_DPI. Hence, theicon was drawn as the same size as the button.</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">New 20.1 code inDrawStatusBarPaneEntry: </p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;if (pIcon)</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp; &nbsp;{</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CSize szIcon =CXTPPaintManager::AdjustDpiIconSize(pIcon, pIcon-&gt;GetExtent(),</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; XTP_SAFE_GET2(pPane,GetStatusBar(),</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;GetCommandBars(), NULL),</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; rcItem.Size());</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">Pre 20.1:</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;if (pIcon)</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp; &nbsp;{</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CSize szIcon(XTP_DPI(pIcon-&gt;GetExtent()));</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">&nbsp;</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">Also, when askingfor the icon by calling GetImage on the image manager, CodeJock is alwayspassing in 0 as the icon size ensuring that regardless of the desktop DPI and what images of varying sizes I load, CodeJock will alwaysobtain the smallest image available. So, even if I set the command bar options to auto scale the icon so it AND the button sizes actually match, CodeJock won't use my 32x32 icons and hence the 16x16 image is scaled during the paint op. Since we use PNG images, CJ eventually uses the GDI AlphaBlend API, one cannot even set halftoning on to try and get a better image.</p><p style="margin:0in;font-family:Calibri;font-size:11.0pt"><br></p><p style="margin:0in;font-family:Calibri;font-size:11.0pt">In the very least, should not this status bar pane drawing code be written such that the scaling of the sizes match what this AdjustDpiIconSize are in agreement?</p>]]>
   </description>
   <pubDate>Wed, 15 Jun 2022 11:45:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24297&amp;PID=78455&amp;title=status-bar-icon-size-issues#78455</guid>
  </item> 
 </channel>
</rss>