<?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 : CXTPImageManagerIcon::DrawAlphaBitmap() wont work</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPImageManagerIcon::DrawAlphaBitmap() wont work]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 21 Apr 2026 02:16:44 +0000</pubDate>
  <lastBuildDate>Fri, 31 Dec 2010 16:51:11 +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=17737</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[CXTPImageManagerIcon::DrawAlphaBitmap() wont work :  I found the origin of the problem:...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17737&amp;PID=62043&amp;title=cxtpimagemanagericondrawalphabitmap-wont-work#62043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6515">tomay3000</a><br /><strong>Subject:</strong> 17737<br /><strong>Posted:</strong> 31 December 2010 at 4:51pm<br /><br />I found the origin of the problem: It was that the PNG image I was using as resource has wrong PNG structure (I corrected it using <b>GIMP</b>).]]>
   </description>
   <pubDate>Fri, 31 Dec 2010 16:51:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17737&amp;PID=62043&amp;title=cxtpimagemanagericondrawalphabitmap-wont-work#62043</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPImageManagerIcon::DrawAlphaBitmap() wont work :  CXTPImageManagerIcon::DrawAlphaBitmap()...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17737&amp;PID=62033&amp;title=cxtpimagemanagericondrawalphabitmap-wont-work#62033</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6515">tomay3000</a><br /><strong>Subject:</strong> 17737<br /><strong>Posted:</strong> 30 December 2010 at 5:01pm<br /><br /><strong>CXTPImageManagerIcon::DrawAlphaBitmap()</strong> wont work on <strong>OnDraw()</strong> virtual function Views !?<br><br><table width="99%"><tr><td><pre class="BBcode">void CGLVAgenceView::OnInitialUpdate()<br>{<br>&nbsp;&nbsp; &nbsp;m_pSet = &amp;GetDocument()-&gt;m_gLVAgenceSet;<br>&nbsp;&nbsp; &nbsp;CRecordView::OnInitialUpdate();<br>&nbsp;&nbsp; &nbsp;GetParentFrame()-&gt;RecalcLayout();<br>&nbsp;&nbsp; &nbsp;ResizeParentToFit();<br><br>&nbsp;&nbsp; &nbsp;HRSRC hResource = ::FindResource(NULL, MAKEINTRESOURCE(IDR_PNG1), _T("PNG"));<br>&nbsp;&nbsp; &nbsp;CXTPGraphicBitmapPng bmpPNG;<br><br>&nbsp;&nbsp; &nbsp;if (!bmpPNG.LoadFromResource(NULL, hResource))<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE0("Failed to load PNG from resource\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // fail load PNG from resource<br>&nbsp;&nbsp; &nbsp;}<br>&nbsp;&nbsp; &nbsp;if (!m_bmp.Attach(CXTPImageManagerIcon::PreMultiplyAlphaBitmap(bmpPNG)))<br>&nbsp;&nbsp; &nbsp;{<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;TRACE0("Failed to attach bmp\n");<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;return;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // fail to attach bmp<br>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;bmpPNG.DeleteObject();<br>&nbsp;&nbsp; &nbsp;}<br>}</pre></td></tr></table><br><br><table width="99%"><tr><td><pre class="BBcode">void CGLVAgenceView::OnDraw(CDC* pDC) <br>{<br>&nbsp;&nbsp; &nbsp;// TODO: Add your specialized code here and/or call the base class<br><br>&nbsp;&nbsp; &nbsp;CXTPImageManagerIcon::DrawAlphaBitmap(pDC, m_bmp, CPoint(7, 7), CSize(48, 48));<br>}</pre></td></tr></table><br><br>Where:<br><table width="99%"><tr><td><pre class="BBcode">private:<br>&nbsp;&nbsp; &nbsp;CBitmap m_bmp;</pre></td></tr></table><br>is previously declared.<br><br>And my <strong>CGLVAgenceView</strong> is a <strong>CRecordView</strong> derived class.<br><br>I tested the same code on an <strong>CDialog</strong> <strong>OnPaint()</strong> message map function &amp; it's working perfectly.<br><br>Any idea ? <img src="http://forum.codejock.com/smileys/smiley5.gif" border="0" alt="C&#111;nfused" title="C&#111;nfused" /><br><br>]]>
   </description>
   <pubDate>Thu, 30 Dec 2010 17:01:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17737&amp;PID=62033&amp;title=cxtpimagemanagericondrawalphabitmap-wont-work#62033</guid>
  </item> 
 </channel>
</rss>