<?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[Bitmap aus array erstellen]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich benötige ein Bitmap - allerdings aheb ich sie nicht über die Resourcen zur Verfügung, sondern nur über ein unsigned char Array ...</p>
<p>Wie bekommt man ein HBITMAP aus diesem Array.</p>
<p>Mein Versuch sieht folgendermaßen aus, leider ohne Erfolg <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<pre><code class="language-cpp">HBITMAP hBitmap; 
  HBITMAP hBitmapPrev;

  CDC * pDC = GetDC(); 

  unsigend char * bits = pD-&gt;getBitmap();

  hBitmap = CreateBitmap (100,100,1,32, bits); 
  CDC iDC;
  iDC.CreateCompatibleDC(pDC);
  hBitmapPrev = (HBITMAP)SelectObject( iDC, hBitmap ); 

  pDC-&gt;BitBlt(5, 5, 50, 50, &amp;iDC, 0, 0, SRCCOPY ); 

  SelectObject( iDC, hBitmapPrev ); 
  iDC.DeleteDC();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/188546/bitmap-aus-array-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 23:04:26 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188546.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Aug 2007 15:33:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bitmap aus array erstellen on Wed, 01 Aug 2007 15:33:15 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich benötige ein Bitmap - allerdings aheb ich sie nicht über die Resourcen zur Verfügung, sondern nur über ein unsigned char Array ...</p>
<p>Wie bekommt man ein HBITMAP aus diesem Array.</p>
<p>Mein Versuch sieht folgendermaßen aus, leider ohne Erfolg <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<pre><code class="language-cpp">HBITMAP hBitmap; 
  HBITMAP hBitmapPrev;

  CDC * pDC = GetDC(); 

  unsigend char * bits = pD-&gt;getBitmap();

  hBitmap = CreateBitmap (100,100,1,32, bits); 
  CDC iDC;
  iDC.CreateCompatibleDC(pDC);
  hBitmapPrev = (HBITMAP)SelectObject( iDC, hBitmap ); 

  pDC-&gt;BitBlt(5, 5, 50, 50, &amp;iDC, 0, 0, SRCCOPY ); 

  SelectObject( iDC, hBitmapPrev ); 
  iDC.DeleteDC();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1336670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1336670</guid><dc:creator><![CDATA[proggynew]]></dc:creator><pubDate>Wed, 01 Aug 2007 15:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap aus array erstellen on Sun, 05 Aug 2007 13:03:29 GMT]]></title><description><![CDATA[<p>Was haben denn Frage und Code miteinander zu tun? Willst du etwa den Inhalt eines Fensters in ein Bitmap bringen oder wie?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338983</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338983</guid><dc:creator><![CDATA[a]]></dc:creator><pubDate>Sun, 05 Aug 2007 13:03:29 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap aus array erstellen on Mon, 06 Aug 2007 08:44:27 GMT]]></title><description><![CDATA[<p>Schau Dir mal CBitmap::SetBitmapBits() an. Den Bitmap Header musst Du natürlich passend zu Deinen Binärdaten füllen.</p>
<p>Oder vielleicht das hier: <a href="http://groups.google.de/group/microsoft.public.vc.mfc/tree/browse_frm/thread/6da13bebc2783295/c959ac950fdde939?rnum=1&amp;q=cbitmap+from+binary+data&amp;_done=%2Fgroup%2Fmicrosoft.public.vc.mfc%2Fbrowse_frm%2Fthread%2F6da13bebc2783295%2F7cc389ad4049ad24%3Flnk%3Dst%26q%3Dcbitmap%2Bfrom%2Bbinary%2Bdata%26rnum%3D14%26#doc_f7550a6a7867538f" rel="nofollow">http://groups.google.de/group/microsoft.public.vc.mfc/tree/browse_frm/thread/6da13bebc2783295/c959ac950fdde939?rnum=1&amp;q=cbitmap+from+binary+data&amp;_done=%2Fgroup%2Fmicrosoft.public.vc.mfc%2Fbrowse_frm%2Fthread%2F6da13bebc2783295%2F7cc389ad4049ad24%3Flnk%3Dst%26q%3Dcbitmap%2Bfrom%2Bbinary%2Bdata%26rnum%3D14%26#doc_f7550a6a7867538f</a></p>
<p>Überhaupt bringt groupgooglen (<a href="http://groups.google.de" rel="nofollow">http://groups.google.de</a>) ne ganze Menge zu diesem Thema: &quot;CBitmap from binary data&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339380</guid><dc:creator><![CDATA[jencas]]></dc:creator><pubDate>Mon, 06 Aug 2007 08:44:27 GMT</pubDate></item><item><title><![CDATA[Reply to Bitmap aus array erstellen on Mon, 06 Aug 2007 09:10:09 GMT]]></title><description><![CDATA[<p>Versuchs doch einfach über SetPixel, wenns nicht allzu schnell gehen soll reicht das. Den Bitmap Header selbst zu schreiben ist, naja, aufwändig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339406</guid><dc:creator><![CDATA[connan]]></dc:creator><pubDate>Mon, 06 Aug 2007 09:10:09 GMT</pubDate></item></channel></rss>