<?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[bitblt will nicht wie ich]]></title><description><![CDATA[<p>hallo leute,<br />
hab diesen code geschrieben um mir ein kleines logo links oben in ein größeres bild zu kopieren.</p>
<pre><code class="language-cpp">//desktopauflösung ermitteln
xres = GetSystemMetrics(SM_CXSCREEN);
yres = GetSystemMetrics(SM_CYSCREEN);

//memory bitmap erstellen
memDC = CreateCompatibleDC ( NULL );
memBM = CreateCompatibleBitmap ( memDC, xres, yres );
SelectObject ( memDC, memBM );

//logo laden, 128 x 128
LogoBM = (HBITMAP)LoadImage(GetModuleHandle(NULL),&quot;C:\\testlogo.bmp&quot;, IMAGE_BITMAP, 128, 128, LR_LOADFROMFILE);
LogoDC = CreateCompatibleDC( NULL );
SelectObject(LogoDC, LogoBM);

// test nr.1 -&gt; wird ein schwarzes bitmap in desktopauflösung
dc2bitmap(memDC, xres,yres,&quot;C:\\test1.bmp&quot;);

// test nr.2 -&gt; wird ein 128x128 bitmap mit dem logo
dc2bitmap(LogoDC,128,128,&quot;C:\\test2.bmp&quot;);

//Logo draufblitten geht anscheinend nicht ????
BitBlt(memDC,0,0,128,128,LogoDC,0,0,SRCCOPY);

//test nr.3 -&gt; wird nur ein schwarzes bitmpa in desktop auflösung
//sollte aber links oben das logo drin sein, ist aber nicht :(
dc2bitmap(memDC,xres,yres,&quot;C:\\test3.bmp&quot;);
</code></pre>
<p>die dc2bitmap-Funktion hab ich hier im Forums-FAQ gefunden.</p>
<p>hab grad keinen plan warum der test3.bmp kein logo links oben hat, sondern nur schwarz ist.</p>
<p>wer sieht einen fehler?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/77445/bitblt-will-nicht-wie-ich</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 19:00:32 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/77445.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 21 Jun 2004 13:08:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to bitblt will nicht wie ich on Mon, 21 Jun 2004 13:08:39 GMT]]></title><description><![CDATA[<p>hallo leute,<br />
hab diesen code geschrieben um mir ein kleines logo links oben in ein größeres bild zu kopieren.</p>
<pre><code class="language-cpp">//desktopauflösung ermitteln
xres = GetSystemMetrics(SM_CXSCREEN);
yres = GetSystemMetrics(SM_CYSCREEN);

//memory bitmap erstellen
memDC = CreateCompatibleDC ( NULL );
memBM = CreateCompatibleBitmap ( memDC, xres, yres );
SelectObject ( memDC, memBM );

//logo laden, 128 x 128
LogoBM = (HBITMAP)LoadImage(GetModuleHandle(NULL),&quot;C:\\testlogo.bmp&quot;, IMAGE_BITMAP, 128, 128, LR_LOADFROMFILE);
LogoDC = CreateCompatibleDC( NULL );
SelectObject(LogoDC, LogoBM);

// test nr.1 -&gt; wird ein schwarzes bitmap in desktopauflösung
dc2bitmap(memDC, xres,yres,&quot;C:\\test1.bmp&quot;);

// test nr.2 -&gt; wird ein 128x128 bitmap mit dem logo
dc2bitmap(LogoDC,128,128,&quot;C:\\test2.bmp&quot;);

//Logo draufblitten geht anscheinend nicht ????
BitBlt(memDC,0,0,128,128,LogoDC,0,0,SRCCOPY);

//test nr.3 -&gt; wird nur ein schwarzes bitmpa in desktop auflösung
//sollte aber links oben das logo drin sein, ist aber nicht :(
dc2bitmap(memDC,xres,yres,&quot;C:\\test3.bmp&quot;);
</code></pre>
<p>die dc2bitmap-Funktion hab ich hier im Forums-FAQ gefunden.</p>
<p>hab grad keinen plan warum der test3.bmp kein logo links oben hat, sondern nur schwarz ist.</p>
<p>wer sieht einen fehler?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/544927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/544927</guid><dc:creator><![CDATA[winapi-nub]]></dc:creator><pubDate>Mon, 21 Jun 2004 13:08:39 GMT</pubDate></item><item><title><![CDATA[Reply to bitblt will nicht wie ich on Mon, 21 Jun 2004 16:06:45 GMT]]></title><description><![CDATA[<p>Das CreateCompatibleBitmap musst du mit einem &quot;normalen&quot; DC aufrufen - nicht mit deinem neu erstellten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/545078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/545078</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 21 Jun 2004 16:06:45 GMT</pubDate></item></channel></rss>