<?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 : CXTPImageManagerIconHandle::CopyHandle</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : CXTPImageManagerIconHandle::CopyHandle]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 11 Jun 2026 22:39:36 +0000</pubDate>
  <lastBuildDate>Tue, 03 Mar 2009 11:28:16 +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=13552</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[CXTPImageManagerIconHandle::CopyHandle : Images are loaded via LoadIconArray...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46196&amp;title=cxtpimagemanagericonhandlecopyhandle#46196</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 13552<br /><strong>Posted:</strong> 03 March 2009 at 11:28am<br /><br />Images are loaded via <FONT size=2>LoadIconArray and are not individual images. When rendering a png to a bitmap, it would seem that the user really needs to be able to provide the background. There are a lot of functions to get icons, bitmaps and even draw into a dc so I will keep trying until I find a method that allows me to obtain the image I need. After all, you manage to draw the images on the command ribbon and tooltips without the black background (and blends to black) that I am seeing.</FONT>]]>
   </description>
   <pubDate>Tue, 03 Mar 2009 11:28:16 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46196&amp;title=cxtpimagemanagericonhandlecopyhandle#46196</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPImageManagerIconHandle::CopyHandle : Hi, Think you can just call HBITMAP...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46162&amp;title=cxtpimagemanagericonhandlecopyhandle#46162</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 13552<br /><strong>Posted:</strong> 03 March 2009 at 12:50am<br /><br /><P>Hi,</P><DIV>Think you can just call</DIV><DIV>HBITMAP AFX_CDECL CXTPImageManagerIcon::LoadBitmapFromResource(LPCTSTR lpszResource, BOOL* lbAlphaBitmap)<BR>and load your png without put it to ImageHandle.</DIV>]]>
   </description>
   <pubDate>Tue, 03 Mar 2009 00:50:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46162&amp;title=cxtpimagemanagericonhandlecopyhandle#46162</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPImageManagerIconHandle::CopyHandle : I am calling CopyHandle and then...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46138&amp;title=cxtpimagemanagericonhandlecopyhandle#46138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 13552<br /><strong>Posted:</strong> 02 March 2009 at 1:17pm<br /><br />I am calling CopyHandle and then GetBitmap.<DIV>&nbsp;</DIV><DIV>For png based glyphs, the call to GetBitmap is returning a bitmap that appears to be blended to a background color that is black. I actually need it blended against a specific background color of a web page as we write out a bmp file that is referenced by the web page. With non-png based glyphs, I am able to spin thru the bitmap before I write it and change the backgound pixels to my desired background. But that doesn't work with the bitmap returned from GetBitmap if the underlying glyph is png because the pixels have already been blended (with black).</DIV><DIV>&nbsp;</DIV><DIV>However I have found that CopyHandle calls <FONT size=2>CXTPImageManagerResource::CreateIcon. In that routine if I bypass the if (pRinfo-&gt;bAlpha) code and force the code in the else clause to run, I get a good bitmap. That is, there are no anomolies when the image is viewd on the web page. The anomolies we see are along the edges where the alpha plane has caused our image to blend to a black background (so we have black looking pixels along some "edges" in the image.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>How can I get a consitent bitmap whether using png or not?</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Do I need to find some code that writes a png or icon out and use those on our web page instead of bmp files? If so, then I have another issue. Whenever I call GetIcon (on the original or the copied icon handle object), the hIcon is always NULL so I have to call GetBitmap.</FONT></DIV>]]>
   </description>
   <pubDate>Mon, 02 Mar 2009 13:17:30 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=13552&amp;PID=46138&amp;title=cxtpimagemanagericonhandlecopyhandle#46138</guid>
  </item> 
 </channel>
</rss>