<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TImage &#x2F; Bild aus Handle laden]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe ein Handle auf ein Bild und würde es gerne in ein TImage laden.</p>
<p>Image1-&gt;Picture-&gt;Bitmap-&gt;Handle = hImg;</p>
<p>geht aber nicht!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/120814/timage-bild-aus-handle-laden</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 00:59:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/120814.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Sep 2005 15:01:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to TImage &#x2F; Bild aus Handle laden on Fri, 16 Sep 2005 15:01:22 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe ein Handle auf ein Bild und würde es gerne in ein TImage laden.</p>
<p>Image1-&gt;Picture-&gt;Bitmap-&gt;Handle = hImg;</p>
<p>geht aber nicht!!!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/873761</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/873761</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Fri, 16 Sep 2005 15:01:22 GMT</pubDate></item><item><title><![CDATA[Reply to TImage &#x2F; Bild aus Handle laden on Fri, 16 Sep 2005 15:38:05 GMT]]></title><description><![CDATA[<p>Hab nun nen Weg gefunden, ist aber sehr umständlich!!!!<br />
Geht es auch einfacher????</p>
<p>Mein Weg:</p>
<pre><code>UCHAR       *lpVoid, *pBits;
   int iBytes;
   Graphics::TBitmap *pBitmap;
   LPBITMAPINFOHEADER pHead;

	lpVoid = (UCHAR *)GlobalLock(hImg);
	pHead = (LPBITMAPINFOHEADER )lpVoid;
	iBytes = (pHead-&gt;biBitCount*pHead-&gt;biWidth) &gt;&gt;3;
	while(iBytes%4) iBytes++;
	pBits = lpVoid + sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD)*m_tw-&gt;GetPaletteSize(info);

   pBitmap = new Graphics::TBitmap;
   pBitmap-&gt;PixelFormat  = pf24bit;
   pBitmap-&gt;Width  = pHead-&gt;biWidth;
   pBitmap-&gt;Height = pHead-&gt;biHeight;

   SetDIBits(pBitmap-&gt;Canvas-&gt;Handle, pBitmap-&gt;Handle, 0,
             (UINT)pHead-&gt;biHeight, pBits, (LPBITMAPINFO)lpVoid,
              DIB_RGB_COLORS);

   Image1-&gt;Width = info.ImageWidth+10;
   Image1-&gt;Height = info.ImageLength+10;
   Image1-&gt;Picture-&gt;Bitmap-&gt;Assign(pBitmap);

   delete pBitmap;
	GlobalUnlock(lpVoid);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/873792</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/873792</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Fri, 16 Sep 2005 15:38:05 GMT</pubDate></item><item><title><![CDATA[Reply to TImage &#x2F; Bild aus Handle laden on Sun, 18 Sep 2005 18:58:04 GMT]]></title><description><![CDATA[<p>IcemanX schrieb:</p>
<blockquote>
<p>Hallo,</p>
<p>habe ein Handle auf ein Bild und würde es gerne in ein TImage laden.</p>
<p>Image1-&gt;Picture-&gt;Bitmap-&gt;Handle = hImg;</p>
<p>geht aber nicht!!!!</p>
</blockquote>
<p>Wenn hImg vom Typ HBITMAP ist, sollte das gehen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/875178</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/875178</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Sun, 18 Sep 2005 18:58:04 GMT</pubDate></item><item><title><![CDATA[Reply to TImage &#x2F; Bild aus Handle laden on Mon, 19 Sep 2005 21:55:58 GMT]]></title><description><![CDATA[<p>Und, gibt es nun einen einfacheren Weg?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/876164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/876164</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Mon, 19 Sep 2005 21:55:58 GMT</pubDate></item><item><title><![CDATA[Reply to TImage &#x2F; Bild aus Handle laden on Wed, 21 Sep 2005 08:36:06 GMT]]></title><description><![CDATA[<p>Was geht denn genau nicht bei Deiner ersten, einfachen Variante?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/876856</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/876856</guid><dc:creator><![CDATA[DerAltenburger]]></dc:creator><pubDate>Wed, 21 Sep 2005 08:36:06 GMT</pubDate></item></channel></rss>