<?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[transparentes Bitmap über GDI]]></title><description><![CDATA[<p>Hallo,<br />
also ich brauche eine Möglichkeit für ein Hintergrundbitmap für ein Fenster eine bestimmte Farbe transparent (also nicht) darzustellen. Das Problem ist, über DirectX weiß ich, wie es funktioniert, in der MSDN fand ich aber keine entsprechenden Informationen über das Setzen von transparenten Farben über die GDI, auch nicht über das Setzen eines transparenten Fensters. Vielleicht hat da jemand einen Beispielcode für. Hier der Code, wie es bisher gemacht wurde:</p>
<pre><code class="language-cpp">CPaintDC dc(this); // device context for painting
    BITMAP bm;

    // TODO: Add your message handler code here
    if (m_bgBitmapOk) {
        m_bgBitmap.GetBitmap (&amp;bm);
        CDC dcMem;
        dcMem.CreateCompatibleDC(&amp;dc);
        CBitmap* pOldBitmap = (CBitmap*)dcMem.SelectObject(m_bgBitmap);
        CRect lRect;
        GetClientRect (lRect);
        lRect.NormalizeRect();
        dc.StretchBlt (0, 0, lRect.Width(), lRect.Height(), &amp;dcMem, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
    }
</code></pre>
<p>m_bgBitmapOk ist vom Typ BOOL, und m_bgBitmap ist CBITMAP, welches vorher geladen wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/6396/transparentes-bitmap-über-gdi</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 02:03:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/6396.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Jun 2003 13:27:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to transparentes Bitmap über GDI on Mon, 30 Jun 2003 13:27:00 GMT]]></title><description><![CDATA[<p>Hallo,<br />
also ich brauche eine Möglichkeit für ein Hintergrundbitmap für ein Fenster eine bestimmte Farbe transparent (also nicht) darzustellen. Das Problem ist, über DirectX weiß ich, wie es funktioniert, in der MSDN fand ich aber keine entsprechenden Informationen über das Setzen von transparenten Farben über die GDI, auch nicht über das Setzen eines transparenten Fensters. Vielleicht hat da jemand einen Beispielcode für. Hier der Code, wie es bisher gemacht wurde:</p>
<pre><code class="language-cpp">CPaintDC dc(this); // device context for painting
    BITMAP bm;

    // TODO: Add your message handler code here
    if (m_bgBitmapOk) {
        m_bgBitmap.GetBitmap (&amp;bm);
        CDC dcMem;
        dcMem.CreateCompatibleDC(&amp;dc);
        CBitmap* pOldBitmap = (CBitmap*)dcMem.SelectObject(m_bgBitmap);
        CRect lRect;
        GetClientRect (lRect);
        lRect.NormalizeRect();
        dc.StretchBlt (0, 0, lRect.Width(), lRect.Height(), &amp;dcMem, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
    }
</code></pre>
<p>m_bgBitmapOk ist vom Typ BOOL, und m_bgBitmap ist CBITMAP, welches vorher geladen wurde.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/31051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31051</guid><dc:creator><![CDATA[AlCheMy]]></dc:creator><pubDate>Mon, 30 Jun 2003 13:27:00 GMT</pubDate></item><item><title><![CDATA[Reply to transparentes Bitmap über GDI on Mon, 30 Jun 2003 18:03:00 GMT]]></title><description><![CDATA[<p>schau mal hier nach: <a href="http://www.henkessoft.de/mfc_einsteigerbuch_kapitel4.htm" rel="nofollow">http://www.henkessoft.de/mfc_einsteigerbuch_kapitel4.htm</a><br />
Abschnitt &quot;4.2 Transparente Bitmaps erzeugen&quot;.</p>
<p>Vielleicht hilft Dir das. <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/31052</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31052</guid><dc:creator><![CDATA[Erhard Henkes]]></dc:creator><pubDate>Mon, 30 Jun 2003 18:03:00 GMT</pubDate></item><item><title><![CDATA[Reply to transparentes Bitmap über GDI on Tue, 01 Jul 2003 09:22:00 GMT]]></title><description><![CDATA[<p>Jep, da kann ich schon mal eine ganze Menge mit anfangen. Thx <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/31053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/31053</guid><dc:creator><![CDATA[AlCheMy]]></dc:creator><pubDate>Tue, 01 Jul 2003 09:22:00 GMT</pubDate></item></channel></rss>