<?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[[gelöst]SetBitmapBits - ich bekomm &#x27;s einfach nicht hin]]></title><description><![CDATA[<p>Hallo,</p>
<p>Also zum Problem: Wenn ich SetBitmapBits verwende bekomm ich immer nur total verschobene und z.T. schwarze Bilder. (Es sind Teile des Ursprünglichen Bildes zu erkennen...)</p>
<pre><code class="language-cpp">char    Bitmap[921600];
HDC     hdcWnd;
HDC     hdcTmp;
HBITMAP hbmBitmap;

/*Bitmap wird zwischendurch gefüllt - funktioniert auch korrekt*/

hdcWnd = GetDC(VidHwnd);
hbmBitmap = CreateCompatibleBitmap(hdcWnd,320,240);
hdcTmp = CreateCompatibleDC(hdcWnd);

SetBitmapBits(hbmBitmap, 921600, Bitmap);
SelectObject(hdcTemp, hbmBitmap);

BitBlt(hdcWnd, 0, 0, 320, 240, hdcTmp, 0, 0, SRCCOPY);
</code></pre>
<p>Ich kann mir jetz nur vorstellen das ich was vergessen habe, oder an irgend einer Stelle die falsche funktion aufrufe, aber ich hab' nicht die geringste Ahnung wo der Fehler liegen könnte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Ich bin für alle Vorschläge offen - auch andere Herangehensweisen.</p>
<p>MfG gosha16</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192592/gelöst-setbitmapbits-ich-bekomm-s-einfach-nicht-hin</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 00:32:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192592.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Sep 2007 16:19:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [gelöst]SetBitmapBits - ich bekomm &#x27;s einfach nicht hin on Sun, 16 Sep 2007 16:37:02 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Also zum Problem: Wenn ich SetBitmapBits verwende bekomm ich immer nur total verschobene und z.T. schwarze Bilder. (Es sind Teile des Ursprünglichen Bildes zu erkennen...)</p>
<pre><code class="language-cpp">char    Bitmap[921600];
HDC     hdcWnd;
HDC     hdcTmp;
HBITMAP hbmBitmap;

/*Bitmap wird zwischendurch gefüllt - funktioniert auch korrekt*/

hdcWnd = GetDC(VidHwnd);
hbmBitmap = CreateCompatibleBitmap(hdcWnd,320,240);
hdcTmp = CreateCompatibleDC(hdcWnd);

SetBitmapBits(hbmBitmap, 921600, Bitmap);
SelectObject(hdcTemp, hbmBitmap);

BitBlt(hdcWnd, 0, 0, 320, 240, hdcTmp, 0, 0, SRCCOPY);
</code></pre>
<p>Ich kann mir jetz nur vorstellen das ich was vergessen habe, oder an irgend einer Stelle die falsche funktion aufrufe, aber ich hab' nicht die geringste Ahnung wo der Fehler liegen könnte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Ich bin für alle Vorschläge offen - auch andere Herangehensweisen.</p>
<p>MfG gosha16</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1366451</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1366451</guid><dc:creator><![CDATA[gosha16]]></dc:creator><pubDate>Sun, 16 Sep 2007 16:37:02 GMT</pubDate></item><item><title><![CDATA[Reply to [gelöst]SetBitmapBits - ich bekomm &#x27;s einfach nicht hin on Sun, 16 Sep 2007 16:35:09 GMT]]></title><description><![CDATA[<p>Ahh jetz häng ich da schon mehrere tage an der einen Stelle und poste das jetz ins Forum... 5 Minuten später hab ich natürlich die Lösung... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
<p>statt <em>CreateCompatibleBitmap</em> hab' ich <em>CreateDIBSection</em> verwendet und es funktioniert klasse <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>MfG gosha16</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1366464</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1366464</guid><dc:creator><![CDATA[gosha16]]></dc:creator><pubDate>Sun, 16 Sep 2007 16:35:09 GMT</pubDate></item></channel></rss>