<?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[DialogBox Hintergrund ändern?]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>Ich habe ein größeres Programm gebaut. Es ist perfekt, nur es fehlt noch ein guter Hintergrund.</p>
<p>Den habe ich auch bereits, nur leider lässt er sich nicht vernünftig einfügen:</p>
<p>SetWindowClass mit GCL_HBRBACKGROUND funktioniert anschienend bei einer DialogBox nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Ich habe das ganze fenster als resource, muss ich jetzt auf alles pfeifen und alle Knöpfe mit CreateWindow etc. erstellen, nur um einen Hintergrund einzufügen?</p>
<p>Habe es wie gesagt hiermit versucht:</p>
<pre><code class="language-cpp">case WM_INITDIALOG:
		{
HBITMAP bmpbackground = LoadBitmap((HINSTANCE) GetModuleHandle(NULL), MAKEINTRESOURCE (ID_BG));
			HBRUSH background = CreatePatternBrush(bmpbackground); 
			SetClassLong (hWin, GCL_HBRBACKGROUND, (LONG) background);
			InvalidateRect(hWin,0,TRUE);
			UpdateWindow(hWin);
}
</code></pre>
<p>gibt auch alles ERROR_SUCCESS zurück, nur es tut sich nichts im Dialog.</p>
<p>Danke schonmal!<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/223765/dialogbox-hintergrund-ändern</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 02:00:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/223765.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Sep 2008 16:57:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DialogBox Hintergrund ändern? on Tue, 30 Sep 2008 17:07:51 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>Ich habe ein größeres Programm gebaut. Es ist perfekt, nur es fehlt noch ein guter Hintergrund.</p>
<p>Den habe ich auch bereits, nur leider lässt er sich nicht vernünftig einfügen:</p>
<p>SetWindowClass mit GCL_HBRBACKGROUND funktioniert anschienend bei einer DialogBox nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f621.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--pouting_face"
      title=":rage:"
      alt="😡"
    /></p>
<p>Ich habe das ganze fenster als resource, muss ich jetzt auf alles pfeifen und alle Knöpfe mit CreateWindow etc. erstellen, nur um einen Hintergrund einzufügen?</p>
<p>Habe es wie gesagt hiermit versucht:</p>
<pre><code class="language-cpp">case WM_INITDIALOG:
		{
HBITMAP bmpbackground = LoadBitmap((HINSTANCE) GetModuleHandle(NULL), MAKEINTRESOURCE (ID_BG));
			HBRUSH background = CreatePatternBrush(bmpbackground); 
			SetClassLong (hWin, GCL_HBRBACKGROUND, (LONG) background);
			InvalidateRect(hWin,0,TRUE);
			UpdateWindow(hWin);
}
</code></pre>
<p>gibt auch alles ERROR_SUCCESS zurück, nur es tut sich nichts im Dialog.</p>
<p>Danke schonmal!<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1591055</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1591055</guid><dc:creator><![CDATA[Listing]]></dc:creator><pubDate>Tue, 30 Sep 2008 17:07:51 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox Hintergrund ändern? on Tue, 30 Sep 2008 18:15:34 GMT]]></title><description><![CDATA[<p>Deine Methode ist falsch, benutze WM_ERASEBKGND um den Hintergrund gemäß Deinen Vorstellungen einzufärben.<br />
Möglich ist auch die Behandlung von WM_CTLCOLORDLG.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1591080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1591080</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 30 Sep 2008 18:15:34 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox Hintergrund ändern? on Tue, 30 Sep 2008 19:42:50 GMT]]></title><description><![CDATA[<p>Aber ich möchte den Hintergrund ja nicht färben, sondern eine Bitmap reinladen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1591114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1591114</guid><dc:creator><![CDATA[Listing]]></dc:creator><pubDate>Tue, 30 Sep 2008 19:42:50 GMT</pubDate></item><item><title><![CDATA[Reply to DialogBox Hintergrund ändern? on Tue, 30 Sep 2008 19:48:32 GMT]]></title><description><![CDATA[<p>Dank der hilfreichen Stichworte konnte ich es finden <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>
<pre><code class="language-cpp">for(int i = 0; i &lt; 1000; ++i)
{
    cout &lt;&lt; &quot;Vielen Dank Martin Richter!&quot; &lt;&lt; endl;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1591117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1591117</guid><dc:creator><![CDATA[Listing]]></dc:creator><pubDate>Tue, 30 Sep 2008 19:48:32 GMT</pubDate></item></channel></rss>