<?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[Transparenter Hintergrund]]></title><description><![CDATA[<p>Hallo alle zusammen,<br />
hab da so 'n kleines Problem. Ich hab ein Fenster erstellt, in dem ein RoundRect<br />
enthalten ist, ich will jetzt das dieses RoundRect so int etwa mein Fenster darstellt (hab das Fenster mit WS_POPUP erstellt). Dazu hab ich in der WNDCLASS die eigenschaft hbrBackground auf NULL gesetzt. Klappt ja auch ganz gut aber ein paar Sachen stören noch, wenn hinter meinem Fenster ein anderes Fenster (z.B. Explorer) geöffnet ist und ich dieses Fenster jetzt minimiere, dann bleiben Teile dieses Fensters im Bereich meines Fensters, der eigentlich trasparent sein müsste. (hoffe hab mich versändlich ausgedrückt).<br />
Kennt jemand eine Lösung, wie ich den Hintergrund des Fensters dauerhaft transparent halte?</p>
<p>MfG<br />
Whisel</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/124198/transparenter-hintergrund</link><generator>RSS for Node</generator><lastBuildDate>Tue, 07 Jul 2026 07:47:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/124198.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 Oct 2005 18:06:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transparenter Hintergrund on Mon, 24 Oct 2005 18:08:19 GMT]]></title><description><![CDATA[<p>Hallo alle zusammen,<br />
hab da so 'n kleines Problem. Ich hab ein Fenster erstellt, in dem ein RoundRect<br />
enthalten ist, ich will jetzt das dieses RoundRect so int etwa mein Fenster darstellt (hab das Fenster mit WS_POPUP erstellt). Dazu hab ich in der WNDCLASS die eigenschaft hbrBackground auf NULL gesetzt. Klappt ja auch ganz gut aber ein paar Sachen stören noch, wenn hinter meinem Fenster ein anderes Fenster (z.B. Explorer) geöffnet ist und ich dieses Fenster jetzt minimiere, dann bleiben Teile dieses Fensters im Bereich meines Fensters, der eigentlich trasparent sein müsste. (hoffe hab mich versändlich ausgedrückt).<br />
Kennt jemand eine Lösung, wie ich den Hintergrund des Fensters dauerhaft transparent halte?</p>
<p>MfG<br />
Whisel</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900291</guid><dc:creator><![CDATA[whisel 0]]></dc:creator><pubDate>Mon, 24 Oct 2005 18:08:19 GMT</pubDate></item><item><title><![CDATA[Reply to Transparenter Hintergrund on Mon, 24 Oct 2005 20:55:11 GMT]]></title><description><![CDATA[<p>Schau dir mal das hier an: <a href="http://www.flipcode.com/articles/article_win32skins.shtml" rel="nofollow">Win32 Window Skinning</a> <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/900435</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900435</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 24 Oct 2005 20:55:11 GMT</pubDate></item><item><title><![CDATA[Reply to Transparenter Hintergrund on Wed, 26 Oct 2005 06:45:33 GMT]]></title><description><![CDATA[<p>Hallo flenders,<br />
vielen, vielen dank! <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="😃"
    /><br />
Genau das hab ich gesucht, nur wusste ich nicht, unter welchem Topic ich das finden soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/900849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/900849</guid><dc:creator><![CDATA[whisel 0]]></dc:creator><pubDate>Wed, 26 Oct 2005 06:45:33 GMT</pubDate></item><item><title><![CDATA[Reply to Transparenter Hintergrund on Wed, 26 Oct 2005 10:28:38 GMT]]></title><description><![CDATA[<p>Feines kleines Tutorial... hab aber damit ein Problem:</p>
<pre><code class="language-cpp">CPaintDC dc(this); 
HDC dcSkin = CreateCompatibleDC(0);
HBITMAP hOldBmp = (HBITMAP)SelectObject(dcSkin, _hBitMap);
BOOL b = BitBlt(dc, 0,0,320,240, dcSkin, 0,0, SRCCOPY);
</code></pre>
<p>...funktioniert erst mal, BitBlt kopiert mir das Bitmap in den dc <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>
<p>Dann habe ich versucht, das ganze noch transparent zu machen:</p>
<pre><code class="language-cpp">SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes;
HMODULE hUser32 = GetModuleHandle(&quot;user32.dll&quot;);
SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes GetProcAddress (hUser32,&quot;SetLayeredWindowAttributes&quot;);
SetLayeredWindowAttributes(m_hWnd,0 , g_iCount, LWA_ALPHA);
</code></pre>
<p>...funzt auch, aber das Bitmap wird nur kanz kurz angezeigt und nach dem ersten Aufruf von SetLayeredWindowAttributes wird nur noch das ganz normale Fenster angezeigt. <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="😞"
    /><br />
Wieso?? BitBlt returned mit 1, das ist auch OK.<br />
Wie kann ich das machen, dass er mein BitMap transparent macht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901026</guid><dc:creator><![CDATA[electron_1]]></dc:creator><pubDate>Wed, 26 Oct 2005 10:28:38 GMT</pubDate></item><item><title><![CDATA[Reply to Transparenter Hintergrund on Wed, 26 Oct 2005 13:00:10 GMT]]></title><description><![CDATA[<p>Hast du das mit BitBlt in WM_PAINT stehen - dort gehört das nämlich hin <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/901158</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901158</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Wed, 26 Oct 2005 13:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to Transparenter Hintergrund on Wed, 26 Oct 2005 13:52:04 GMT]]></title><description><![CDATA[<p>yes...in dlg::OnDraw</p>
<p>Wie gesagt, es funktioniert...bis zu dem Zeitpunkt wo</p>
<pre><code>SetLayeredWindowAttributes
</code></pre>
<p>aufgerufen wird. Die Funktion zeigt dann wieder meinen Dialog im Standard-Look an, aber trasparent.<br />
Ein Invalidate ruf ich auch noch nach SetLayeredWindowAttributes auf, damit der Dialog neu gezeichnet wird - funzt auch, aber das Bitmap wird nicht mehr angezeigt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/901203</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/901203</guid><dc:creator><![CDATA[electron_1]]></dc:creator><pubDate>Wed, 26 Oct 2005 13:52:04 GMT</pubDate></item></channel></rss>