<?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[Farbe der Listbox ändern]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>weiß jemand, wie ich die Farbe einer Listbox ändern kann??? Finde keine Funktion dafür. Hoffe mir kann jemand helfen.</p>
<p>MFG SPAXX</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/73051/farbe-der-listbox-ändern</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 11:33:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/73051.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 May 2004 13:17:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Farbe der Listbox ändern on Wed, 05 May 2004 13:17:41 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>weiß jemand, wie ich die Farbe einer Listbox ändern kann??? Finde keine Funktion dafür. Hoffe mir kann jemand helfen.</p>
<p>MFG SPAXX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/514729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/514729</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Wed, 05 May 2004 13:17:41 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe der Listbox ändern on Wed, 05 May 2004 13:45:51 GMT]]></title><description><![CDATA[<p>Servus,</p>
<pre><code class="language-cpp">HBRUSH CDeinDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
    HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

    if (pWnd-&gt;GetDlgCtrlID()==ID_CONTROL)
    {
        pDC-&gt;SetTextColor(RGB(255,0,0)); //Textfarbe
	pDC-&gt;SetBkMode(TRANSPARENT);
        HBRUSH B = CreateSolidBrush(RGB(192,192,192)); //Hintergrundfarbe
        return (HBRUSH) B;
    }

    return hbr;
}
</code></pre>
<p>Fügst die Funktion OnCtlColor ein und schreibst das darein. ID_CONTROL muss die ID deiner ListBox sein.<br />
Der Rest erklärt sich glaube ich von selbst. *faulist* <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="😃"
    /></p>
<p>Viel Spass<br />
*winke*<br />
Hellsgore</p>
<p>PS: Glaube das steht auch irgendwo in der FAQ - MFC</p>
]]></description><link>https://www.c-plusplus.net/forum/post/514747</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/514747</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 05 May 2004 13:45:51 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe der Listbox ändern on Thu, 06 May 2004 06:45:57 GMT]]></title><description><![CDATA[<p>ich habe jetzt in der View die Methode angelegt. Und der bringt mir bei</p>
<p>HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);</p>
<p>einen Fehler. Der sagt, das ich auf die Methode keinen Zugriff habe, da sie protected ist. Macht das einen Unterschied, ob ich eine Dialogfeldbasierende oder eine SDI Anwendung??? habe nämlich SDI.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515139</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515139</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Thu, 06 May 2004 06:45:57 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe der Listbox ändern on Thu, 06 May 2004 06:50:14 GMT]]></title><description><![CDATA[<p>sorry, mein Fehler. Jetzt gehts. thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515143</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515143</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Thu, 06 May 2004 06:50:14 GMT</pubDate></item><item><title><![CDATA[Reply to Farbe der Listbox ändern on Thu, 06 May 2004 07:03:48 GMT]]></title><description><![CDATA[<p>aber noch ne kleine Frage. Kann ich da auch die Hintergrundfarbe des Programms ändern bzw. Die Button Farbe etc.?? wenn ja wie?? Meine Versuche das abzuleiten sind fehlgeschlagen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/515149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/515149</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Thu, 06 May 2004 07:03:48 GMT</pubDate></item></channel></rss>