<?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[Schrifthintergrund in Groupbox ändern?]]></title><description><![CDATA[<p>ich habe auf einen Tab Control eine Group Box plaziert - leider hat der Text eine andere Hintergrundfarbe als das Tab Control:<br />
<a href="http://turing.fh-landshut.de/~jamann/groupbox.PNG" rel="nofollow">http://turing.fh-landshut.de/~jamann/groupbox.PNG</a></p>
<p>wie kann ich die Hintergrund-Text-Farbe der Group Box ändern?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/161078/schrifthintergrund-in-groupbox-ändern</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 15:05:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/161078.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Oct 2006 00:17:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 00:17:15 GMT]]></title><description><![CDATA[<p>ich habe auf einen Tab Control eine Group Box plaziert - leider hat der Text eine andere Hintergrundfarbe als das Tab Control:<br />
<a href="http://turing.fh-landshut.de/~jamann/groupbox.PNG" rel="nofollow">http://turing.fh-landshut.de/~jamann/groupbox.PNG</a></p>
<p>wie kann ich die Hintergrund-Text-Farbe der Group Box ändern?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1148439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148439</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Tue, 03 Oct 2006 00:17:15 GMT</pubDate></item><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 00:38:23 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Indem du WM_CTLCOLORBTN in der Nachrichten-Prozedur deines Parent-Fensters abfängst (Ich gehe mal davon aus, das es ein Dialog ist):</p>
<p>Zum Beispiel so:</p>
<pre><code class="language-cpp">case WM_CTLCOLORBTN:
    if(reinterpret_cast&lt;HWND&gt;(lParam) == GetDlgItem(hDlg, GROUPBOX_ID))
    {
        SetBkMode(reinterpret_cast&lt;HDC&gt;(wParam), TRANSPARENT);
        // hbBkgndBrush ist der Brush, mit dem der Hintergrund gefüllt werden soll:
        return (reinterpret_cast&lt;INT_PTR&gt;(hbBkgndBrush));
    }
    return (FALSE);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1148441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148441</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Tue, 03 Oct 2006 00:38:23 GMT</pubDate></item><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 11:04:43 GMT]]></title><description><![CDATA[<p>ich benutze keinen Dialog sondern nur reine WinAPI</p>
<pre><code class="language-cpp">m_hWnd = CreateWindowEx (0, L&quot;BUTTON&quot;, m_Text.c_str(), WS_VISIBLE | WS_CHILD | BS_GROUPBOX,
this-&gt;getX(), getY(), getWidth(), getHeight(), hWnd,
(HMENU) NULL, (HINSTANCE) GetModuleHandle (NULL), NULL);

HDC hdc = GetDC(m_hWnd);

assert(hdc);

if(hdc)
{
	int result = SetBkMode(hdc, OPAQUE/*TRANSPARENT*/); 
	assert(result != 0);
	SetBkColor(hdc, RGB(255,0,0));
	DeleteDC(hdc);
}

SendMessage(m_hWnd, WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
</code></pre>
<p>Der Schrifthintergrund ist nicht rot - sondern immer noch grau...? Wahrscheinlich liegt das an der DEFAULT_GUI_FONT - die übermalt mir vielleicht meinen roten Hintergrund...?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1148573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148573</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Tue, 03 Oct 2006 11:04:43 GMT</pubDate></item><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 13:36:04 GMT]]></title><description><![CDATA[<p>Vertexwahn schrieb:</p>
<blockquote>
<p>ich benutze keinen Dialog sondern nur reine WinAPI</p>
<pre><code class="language-cpp">m_hWnd = CreateWindowEx (0, L&quot;BUTTON&quot;, m_Text.c_str(), WS_VISIBLE | WS_CHILD | BS_GROUPBOX,
this-&gt;getX(), getY(), getWidth(), getHeight(), hWnd,
(HMENU) NULL, (HINSTANCE) GetModuleHandle (NULL), NULL);

HDC hdc = GetDC(m_hWnd);

assert(hdc);

if(hdc)
{
	int result = SetBkMode(hdc, OPAQUE/*TRANSPARENT*/); 
	assert(result != 0);
	SetBkColor(hdc, RGB(255,0,0));
	DeleteDC(hdc);
}

SendMessage(m_hWnd, WM_SETFONT,(WPARAM)GetStockObject(DEFAULT_GUI_FONT),0);
</code></pre>
<p>Der Schrifthintergrund ist nicht rot - sondern immer noch grau...? Wahrscheinlich liegt das an der DEFAULT_GUI_FONT - die übermalt mir vielleicht meinen roten Hintergrund...?</p>
</blockquote>
<p>Nein so geht das auch nicht! ...Dein Fenster wird von Windows (da es sich um ein Std-Control handelt) immer dann darüber informiert<br />
(mit WM_CTLCOLORBTN), wenn es gezeichnet werden muss. Da und NUR da kannst du also die Werte ändern. Dein Button den du da oben erstellsts hat doch ein Parent-Fenster 'hWnd', in deren WndProc du doch den Msg-Handler einbauen kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1148665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148665</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Tue, 03 Oct 2006 13:36:04 GMT</pubDate></item><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 14:48:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/2025">@Vertexwahn</a><br />
LOL nee ne? Sag mal was lernt ihr da an der Uni? Nichts?!</p>
<p>Ob man nun einen Dialog benutzt oder reine WinAPI ist doch total egal <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="😃"
    /> Dialoge sind auch Fenster. Ouhm man ey...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1148709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148709</guid><dc:creator><![CDATA[##########]]></dc:creator><pubDate>Tue, 03 Oct 2006 14:48:21 GMT</pubDate></item><item><title><![CDATA[Reply to Schrifthintergrund in Groupbox ändern? on Tue, 03 Oct 2006 17:43:29 GMT]]></title><description><![CDATA[<p>@##########</p>
<p>sollen wir mal einen Vergleich ansellen wer mehr drauf hat <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="😉"
    /> - jeder zeigt sein programmierten Projekte her und dann lassen wir die Leute abstimmen wers besser drauf hat <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="😉"
    /> - praktisch so ein Programmierer Battle</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1148798</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1148798</guid><dc:creator><![CDATA[Vertexwahn]]></dc:creator><pubDate>Tue, 03 Oct 2006 17:43:29 GMT</pubDate></item></channel></rss>