<?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 : CXTPButton images on high dpi</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPButton images on high dpi]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 14:21:58 +0000</pubDate>
  <lastBuildDate>Fri, 27 Jan 2017 09:36:01 +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=22732</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[CXTPButton images on high dpi : Yes, please fix the CXTPButton...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=75523&amp;title=cxtpbutton-images-on-high-dpi#75523</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=686">cpede</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 27 January 2017 at 9:36am<br /><br />Yes, please fix the CXTPButton images with high DPI.<div><br></div><div>-cpede</div>]]>
   </description>
   <pubDate>Fri, 27 Jan 2017 09:36:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=75523&amp;title=cxtpbutton-images-on-high-dpi#75523</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : CXTPButton have the same problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=75496&amp;title=cxtpbutton-images-on-high-dpi#75496</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3171">evoX</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 15 January 2017 at 4:22pm<br /><br />CXTPButton have the same problem :(<div>Images are scaled very badly on larger DPI and button text remain small and is not scaled up.</div><div>Even if I specify a larger icon for the button, it still gets scaled and messed up. Is there a way to disable the image scaling on CXTPButton ? And enlarge the button text font?</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Sun, 15 Jan 2017 16:22:33 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=75496&amp;title=cxtpbutton-images-on-high-dpi#75496</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : I&amp;#039;ve just downloaded codejock...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74489&amp;title=cxtpbutton-images-on-high-dpi#74489</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 22 February 2016 at 12:57pm<br /><br />I've just downloaded codejock version 17.1 and am currently testing it and going through all the high dpi issues I found with the Beta 3.<br /><br />1) The CXTPCheckListBox is still not considering the correct rect when clicking on and invalidating it. I've changed my solution so the constructor of the m_checkListState member wraps the m_sizeCheck variable in the XTP_DPI macro:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_sizeCheck.cx = XTP_DPI_X(bm.bmWidth / 3);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_sizeCheck.cy = XTP_DPI_Y(bm.bmHeight);<br /><br /><br />2) Large toolbars still aren't showing the correct size icon. We're still having to apply the XTP_DPI macro to the size passed to the SetIconSize function in the CXTPToolBar LoadToolBar function.<br /><br /><br />3) The issue with the CXTPRibbonBackstageViewThemeResource simply scaling up small icons has now been fixed. Thanks.<br /><br /><br />4) Some of the Codejock controls, like radio buttons, slider controls and scroll bars on gallery controls are still quite badly pixelated at high DPI.<br /><br /><br />5) As you already noted, you did not implement my CXTPControlBitmap::GetSize fix, stating that it "changes default behavior for the function and thus most likely other customers will complain about broken behavior in their scenarios." It is still a necessary fix for us to enable us to show the best size image for the dpi.<br /><br /><br />6) There is still an issue with gallery control items showing icon sizes that best fit the dpi. The existing code just displays the smallest icon using CXTPControlGalleryItem::GetImage() function. I've had to change this function to take a boolean parameter, and change the CXTPControlGalleryPaintManager DrawItem function to intially find the smallest icon, to work out drawing extents, and then just before drawing, finds the best icon to draw. So the code inside the CXTPControlGalleryItem GetImage function now looks like this:<br /><br />CXTPImageManagerIcon* CXTPControlGalleryItem::GetImage(bool bSmall)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;if (!m_pItems)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return NULL;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;return m_pItems-&gt;GetImageManager()-&gt;GetImage(m_nImage &gt;= 0 ? m_nImage : m_nId, (bSmall == true) ? 0 : m_nImageWidth);<br />}<br /><br />and the CXTPControlGalleryPaintManager DrawItem function now looks something like:<br /><br />void CXTPControlGalleryPaintManager::DrawItem(...)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPImageManagerIcon* pImage = pGalleryItem-&gt;GetImage(true);<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;if (...)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pImage = pGalleryItem-&gt;GetImage(false))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pImage-&gt;Draw(...);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;else if (...)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pImage = pGalleryItem-&gt;GetImage(false))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pImage-&gt;Draw(...);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;else if (...)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (pImage = pGalleryItem-&gt;GetImage(false))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pImage-&gt;Draw(...);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />}<br /><br />For this to have any effect, larger images must be supplied and gallery items must call SetImageWidth, with the smallest icon width wrapped in the XTP_DPI_X macro. Excuse me if my previous explanation of the problem and my solution weren't clear enough.<br /><br /><br />7) The issue I was having with providing larger icon sets for ribbon bar items, messing up the ribbon layout has now been fixed. Thankyou.<br /><br /><br />8) The issue with right-click context menus always showing the smallest icon has not been fixed. I appreciate you could not implement our fix, but we will continue to use it, as it hasn't caused any unexpected results for us or our customers.<br /><br /><br />9) The issue we found with icons on the Status Bar simply scaling up the smallest icon provided, also has not been fixed. I trust you are looking into this and we will continue to use our fix.<br /><br /><br />10) The inital problem we found with icons on buttons simply scaling up the smallest size provided is still an issue. We will continue to remove the XTP_DPI macro from calls to pButton-&gt;GetImageSize() in both the CXTPButtonTheme and CXTPButtonThemeOffice2013 classes.<br /><br /><br />In addition to this, the new version appears to badly clip tooltip text. I don't know if you're aware of this. It may be expecting a small size image when calculating the tooltip rect and then when it displays the tooltip, it uses the largest image and doesn't have enough room to display the text. I'll look into it further.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]>
   </description>
   <pubDate>Mon, 22 Feb 2016 12:57:49 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74489&amp;title=cxtpbutton-images-on-high-dpi#74489</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : I&amp;#039;ve just found an issue...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74156&amp;title=cxtpbutton-images-on-high-dpi#74156</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 01 December 2015 at 5:54am<br /><br />I've just found an issue with the CXTPCheckListBox class. The hit test rect for the check box appears to be incorrect as does the invalidation rect.<br /><br />To fix this I made a changes to the CXTPCheckListBox, InvalidateCheck and OnLButtonDown functions, wrapping the m_checkListState.m_sizeCheck.cx parameters in the XTP_DPI_X macro.]]>
   </description>
   <pubDate>Tue, 01 Dec 2015 05:54:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74156&amp;title=cxtpbutton-images-on-high-dpi#74156</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : I&amp;#039;ve just had to make another...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74112&amp;title=cxtpbutton-images-on-high-dpi#74112</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 17 November 2015 at 1:00pm<br /><br />I've just had to make another fix for toolbars we have in our applications that are non standard sizes. In these instances it's displaying the smallest icon rather than the one that best fits the dpi setting.<br /><br />Towards the end of the LoadToolBar function in the CXTPCommandBar class there's a line of code:<br /><br />if (pData-&gt;wWidth != 16)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetIconSize(CSize(pData-&gt;wWidth, pData-&gt;wHeight));<br />}<br /><br />To get it to work correctly I've wrapped the CSize in the XTP_DPI macro, giving me:<br /><br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SetIconSize(XTP_DPI(CSize(pData-&gt;wWidth, pData-&gt;wHeight)));<br />}<br /><br />]]>
   </description>
   <pubDate>Tue, 17 Nov 2015 13:00:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74112&amp;title=cxtpbutton-images-on-high-dpi#74112</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : I&amp;#039;d really appreciate it...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74082&amp;title=cxtpbutton-images-on-high-dpi#74082</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 02 November 2015 at 1:41pm<br /><br />I'd really appreciate it if you could give me some idea of when the final release is due, as it would help us with scheduling our development.<br /><br />I've had a look at other forum posts but can't see any mention of it anywhere. I seem to recall reading it was due sometime in October.<br /><br />Thanks]]>
   </description>
   <pubDate>Mon, 02 Nov 2015 13:41:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74082&amp;title=cxtpbutton-images-on-high-dpi#74082</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : Thanks for getting back to me....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74075&amp;title=cxtpbutton-images-on-high-dpi#74075</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 30 October 2015 at 2:51pm<br /><br />Thanks for getting back to me. I've been a bit too busy getting our suite of applications ready but will respond when I have a few minutes.<br /><br />We are looking to release our software shortly, maybe mid to late November, and we wondered what your schedule is for the final Version 17 release.<br /><br />Thanks,<br />James]]>
   </description>
   <pubDate>Fri, 30 Oct 2015 14:51:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74075&amp;title=cxtpbutton-images-on-high-dpi#74075</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : Hello JamesP,Thank you for applying...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74041&amp;title=cxtpbutton-images-on-high-dpi#74041</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8199">astoyan</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 18 October 2015 at 4:15pm<br /><br />Hello JamesP,<div><br></div><div>Thank you for applying so much efforts sharing your work, we appreciate it. We are aware about all these and other similar issues, the biggest challenge for us is to add DPI support to controls that have not been initially designed for anything like that and make sure we don't break any backward compatibility in most common scenarios, this is why in some cases the solutions don't seem perfect, but at least they satisfy the majority.</div><div><br></div><div>Your fixes have been reviewed, here is the report:</div><div>1. The CXTPStatusBarPane::GetImage fix looks like it can introduce issues in other scenarios when a wide item is used with a large image available. It'll be reviewed futher.</div><div>2. Unfortunately CXTPCommandbar::GetIconSize is already used in may places inappropriately and the provided fix will break many unexpected places in different scenarios.</div><div>3. The CXTPControlGalleryItem::GetImage fix. It looks like you always call GetImage(false) which makes no difference and the code works just like before.</div><div>4. The CXTPControlBitmap::GetSize fix changes default behavior for the function and thus most likely other customers will complain about broken behavior in their scenarios.</div><div>5. The GetAutoIconSize and CXTPRibbonBackstageViewThemeResource fixes have been verified and included.</div><div><br></div><div>Thank you.</div><div>Regards,</div><div>&nbsp; Alexander</div>]]>
   </description>
   <pubDate>Sun, 18 Oct 2015 16:15:55 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74041&amp;title=cxtpbutton-images-on-high-dpi#74041</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : Glad to help Mark. It&amp;#039;s partly...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74038&amp;title=cxtpbutton-images-on-high-dpi#74038</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4855">JamesP</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 15 October 2015 at 11:34am<br /><br />Glad to help Mark. It's partly for my own reference as I expect to have to go through this whole process again when 17.0 is released.<br /><br />I've found another issue. In the ribbon bar system button, the icons that appear here are simply small icons, scaled up. To fix it I've changed the DrawControl function in the CXTPRibbonBackstageViewThemeResource class.<br /><br />The code that looks like the following<br /><br />CXTPImageManagerIcon* pIcon = pView-&gt;GetImageManager()-&gt;GetImage(pControl-&gt;GetIconId());<br />if (pIcon)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;// Office 2010 respects this rule of 120 DPI<br />&nbsp;&nbsp;&nbsp;&nbsp;...<br />}<br /><br />I've changed to:<br /><br />CXTPImageManagerIcon* pSmallIcon = pView-&gt;GetImageManager()-&gt;GetImage(pControl-&gt;GetIconId(), ICON_SMALL);<br />if (pSmallIcon)<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;// Office 2010 respects this rule of 120 DPI<br />&nbsp;&nbsp;&nbsp;&nbsp;CSize szIconScalled(XTPDpiHelper()-&gt;ScaleX(pSmallIcon-&gt;GetWidth(), 120), XTPDpiHelper()-&gt;ScaleY(pSmallIcon-&gt;GetHeight(), 120));<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CPoint ptIcon = CPoint(rcText.left, (rcText.top + rcText.bottom - szIconScalled.cy ) / 2);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if (auto pBestIcon = pView-&gt;GetImageManager()-&gt;GetImage(pControl-&gt;GetIconId(), szIconScalled.cx))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBestIcon-&gt;Draw(pDC, ptIcon, pBestIcon-&gt;GetIcon(bEnabled ? xtpImageNormal : xtpImageDisabled), szIconScalled);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;rcText.left += XTPDpiHelper()-&gt;ScaleX(pSmallIcon-&gt;GetWidth(), 120) + m_nImageMargin;<br />}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]>
   </description>
   <pubDate>Thu, 15 Oct 2015 11:34:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74038&amp;title=cxtpbutton-images-on-high-dpi#74038</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPButton images on high dpi : James, thanks for taking the time...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74029&amp;title=cxtpbutton-images-on-high-dpi#74029</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=669">markr</a><br /><strong>Subject:</strong> 22732<br /><strong>Posted:</strong> 14 October 2015 at 1:06pm<br /><br />James, thanks for taking the time to post all of this information. Should prove useful to those of us about to undertake a similar process.<div><br></div><div>- Mark R.</div>]]>
   </description>
   <pubDate>Wed, 14 Oct 2015 13:06:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22732&amp;PID=74029&amp;title=cxtpbutton-images-on-high-dpi#74029</guid>
  </item> 
 </channel>
</rss>