<?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 Static auf Tab Control]]></title><description><![CDATA[<p>Hallo,<br />
wenn man ein Static ( ganz normal mit Text ) transparent machen möchte, kann man ja beim Parentfenster die WM_CTLCOLORSTATIC Nachricht verarbeiten.<br />
Was ist aber, wenn das Static ein Child eines Tab Controls ist ( das standardmäßig einen weissen Hintergrund hat )? Dann ist immer ein grauer Rahmen um das Static herum zu sehen. Ich habe schon versucht, dem Tab Control eine WndProc zu geben, aber dann wird es garnicht mehr angezeigt. oO</p>
<p>Wisst ihr einen Rat?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/195049/transparentes-static-auf-tab-control</link><generator>RSS for Node</generator><lastBuildDate>Tue, 30 Jun 2026 03:28:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/195049.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Oct 2007 11:43:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sat, 13 Oct 2007 11:43:10 GMT]]></title><description><![CDATA[<p>Hallo,<br />
wenn man ein Static ( ganz normal mit Text ) transparent machen möchte, kann man ja beim Parentfenster die WM_CTLCOLORSTATIC Nachricht verarbeiten.<br />
Was ist aber, wenn das Static ein Child eines Tab Controls ist ( das standardmäßig einen weissen Hintergrund hat )? Dann ist immer ein grauer Rahmen um das Static herum zu sehen. Ich habe schon versucht, dem Tab Control eine WndProc zu geben, aber dann wird es garnicht mehr angezeigt. oO</p>
<p>Wisst ihr einen Rat?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384346</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384346</guid><dc:creator><![CDATA[winni api]]></dc:creator><pubDate>Sat, 13 Oct 2007 11:43:10 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sat, 13 Oct 2007 13:41:36 GMT]]></title><description><![CDATA[<p>Warm willst Du das Static Transparent machen? Man gibt ihm normalerweise in WM_CTLCOLORSTATIC einfach den Hintergrund den man braucht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384413</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 13 Oct 2007 13:41:36 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sat, 13 Oct 2007 14:31:34 GMT]]></title><description><![CDATA[<p>Ob transparent oder Hintergrundfarbe ist ja letztendlich egal.<br />
Nur weiß ich eben nicht, wie ich WM_CTLCOLORSTATIC bei einem Tab Control anwenden soll.<br />
Wenn ich ihm eine WndProc gebe, sieht man wie gesagt gar nichts mehr.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384443</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384443</guid><dc:creator><![CDATA[winni api]]></dc:creator><pubDate>Sat, 13 Oct 2007 14:31:34 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sat, 13 Oct 2007 16:19:05 GMT]]></title><description><![CDATA[<p>Dann zeig doch mal bitte was Du machst!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384504</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384504</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 13 Oct 2007 16:19:05 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sat, 13 Oct 2007 21:52:16 GMT]]></title><description><![CDATA[<p>Das ist der relevante Codeausschnitt. Wenn ich die WndProc setze, wird nichts mehr angezeigt.</p>
<pre><code class="language-cpp">LRESULT CALLBACK TabberProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
	switch( msg )
	{
		case WM_CTLCOLORSTATIC:
			SetBkMode( ( HDC )wparam, TRANSPARENT );
			return ( LRESULT )GetStockObject( HOLLOW_BRUSH );
	}

	return DefWindowProc( hwnd, msg, wparam, lparam );
}

// ...

// Tab Control erstellen

// ...

SetWindowLong( tabcontrol, GWL_WNDPROC, ( LONG )TabberProc );
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1384693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384693</guid><dc:creator><![CDATA[winni api]]></dc:creator><pubDate>Sat, 13 Oct 2007 21:52:16 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sun, 14 Oct 2007 10:53:44 GMT]]></title><description><![CDATA[<p>winni api schrieb:</p>
<blockquote>
<p>Das ist der relevante Codeausschnitt. Wenn ich die WndProc setze, wird nichts mehr angezeigt.</p>
<pre><code class="language-cpp">LRESULT CALLBACK TabberProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
	switch( msg )
	{
		case WM_CTLCOLORSTATIC:
			SetBkMode( ( HDC )wparam, TRANSPARENT );
			return ( LRESULT )GetStockObject( HOLLOW_BRUSH );
	}

	return DefWindowProc( hwnd, msg, wparam, lparam );
}

// ...

// Tab Control erstellen

// ...

SetWindowLong( tabcontrol, GWL_WNDPROC, ( LONG )TabberProc );
</code></pre>
</blockquote>
<p>Das wundert mich gar nicht.<br />
Du spingst ja auchnicht die alte Fensterprozedur an. Was Du hier machst ist kein korrektes Subclassing! Du musst die alte Fensterprozedur sichern und mit CallWindowProc auch in Deiner Fensterprozedur anspringen...</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/ms633571.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/ms633571.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384788</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384788</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 14 Oct 2007 10:53:44 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sun, 14 Oct 2007 11:26:17 GMT]]></title><description><![CDATA[<p>Ah, vielen Dank!<br />
Ich dachte DefWindowProc sucht sich automatisch die richtige Funktion für den Fenstertyp aus. Aber mit Subclassing ist der Aufwand ja auch minimal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384806</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384806</guid><dc:creator><![CDATA[winni api]]></dc:creator><pubDate>Sun, 14 Oct 2007 11:26:17 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sun, 14 Oct 2007 12:08:29 GMT]]></title><description><![CDATA[<p>winni api schrieb:</p>
<blockquote>
<p>Ich dachte DefWindowProc sucht sich automatisch die richtige Funktion für den Fenstertyp aus. Aber mit Subclassing ist der Aufwand ja auch minimal.</p>
</blockquote>
<p>Nein DefWindowProc macht das &quot;Allgemeingültige&quot; aber nicht das spezielle, dafür ist eben die Fensterprozedur da und die hast Du ausgeklammert. So war eben auch keiner da, der etwas gezeichnet hat...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1384832</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1384832</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 14 Oct 2007 12:08:29 GMT</pubDate></item><item><title><![CDATA[Reply to Transparentes Static auf Tab Control on Sun, 14 Oct 2007 20:07:14 GMT]]></title><description><![CDATA[<p>Jetzt tut sich schon das nächste Problem auf. Ich hab einen Screenshot davon gemacht: <a href="http://img57.imageshack.us/img57/7842/groupboxxg6.png" rel="nofollow">http://img57.imageshack.us/img57/7842/groupboxxg6.png</a></p>
<p>Die Objekte, die Childs vom Fenster und Tab Control sind, werden richtig dargestellt. Auch die Statics bei der Group Box. Nur der Button hat einen schwarzen Rand, obwohl die Funktion genau das selbe macht, wie bei dem anderen Button.</p>
<p>Gibt es auch dafür eine Lösung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1385168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1385168</guid><dc:creator><![CDATA[winni api]]></dc:creator><pubDate>Sun, 14 Oct 2007 20:07:14 GMT</pubDate></item></channel></rss>