<?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[Rahmen um Fenster zeichnen]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich versuche mit DrawEdge einen Rahmen zu zeichnen aber es funktioniert einfahc nicht:</p>
<pre><code class="language-cpp">case WM_PAINT:
		HDC hdc;
		RECT rc;
		GetWindowRect(hwndDialog, &amp;rc);
		hdc = GetWindowDC(hwndDialog);
		DrawEdge(hdc, &amp;rc, EDGE_SUNKEN, BF_RECT);
		ReleaseDC(hwndDialog, hdc);
		return 0;
</code></pre>
<p>Das Fenster wird dabei so wie immer angezeigt (ohne Rahmen).<br />
hdc und rc sind OK und DrawEdge gibt eine 1 zurück (also erfolgreich).<br />
Warum funktioniert es trotzdem nicht? <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="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/topic/135737/rahmen-um-fenster-zeichnen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 02:42:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/135737.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Feb 2006 15:29:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Rahmen um Fenster zeichnen on Sat, 04 Feb 2006 15:29:23 GMT]]></title><description><![CDATA[<p>Hallo Leute,</p>
<p>ich versuche mit DrawEdge einen Rahmen zu zeichnen aber es funktioniert einfahc nicht:</p>
<pre><code class="language-cpp">case WM_PAINT:
		HDC hdc;
		RECT rc;
		GetWindowRect(hwndDialog, &amp;rc);
		hdc = GetWindowDC(hwndDialog);
		DrawEdge(hdc, &amp;rc, EDGE_SUNKEN, BF_RECT);
		ReleaseDC(hwndDialog, hdc);
		return 0;
</code></pre>
<p>Das Fenster wird dabei so wie immer angezeigt (ohne Rahmen).<br />
hdc und rc sind OK und DrawEdge gibt eine 1 zurück (also erfolgreich).<br />
Warum funktioniert es trotzdem nicht? <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="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/985786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/985786</guid><dc:creator><![CDATA[poncho]]></dc:creator><pubDate>Sat, 04 Feb 2006 15:29:23 GMT</pubDate></item><item><title><![CDATA[Reply to Rahmen um Fenster zeichnen on Sat, 04 Feb 2006 15:31:04 GMT]]></title><description><![CDATA[<p>In WM_PAINT sollte man immer &quot;BeginPaint&quot; und &quot;EndPaint&quot; verwenden um den DC zu erhalten!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/985788</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/985788</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 04 Feb 2006 15:31:04 GMT</pubDate></item><item><title><![CDATA[Reply to Rahmen um Fenster zeichnen on Sat, 04 Feb 2006 16:31:09 GMT]]></title><description><![CDATA[<p>Das hatte ich auch schon ausprobiert, hat aber leider auch nicht funktioniert:</p>
<pre><code class="language-cpp">HDC hdc;
		RECT rc;
		PAINTSTRUCT ps;
		GetWindowRect(hwndDialog, &amp;rc);
		hdc = BeginPaint(hwndDialog, &amp;ps);
		success = DrawEdge(hdc, &amp;rc, EDGE_SUNKEN, BF_RECT);
		EndPaint(hwndDialog, &amp;ps);
		return 0;
</code></pre>
<p>Auch hier gibt es keinen Fehler aber trotzdem sieht man keinen Rahmen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/985849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/985849</guid><dc:creator><![CDATA[poncho]]></dc:creator><pubDate>Sat, 04 Feb 2006 16:31:09 GMT</pubDate></item><item><title><![CDATA[Reply to Rahmen um Fenster zeichnen on Sat, 04 Feb 2006 19:03:39 GMT]]></title><description><![CDATA[<p>Ich hab das Problem gefunden. GetWindowRect war falsch, es muss GetClientRect genutzt werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/985995</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/985995</guid><dc:creator><![CDATA[poncho]]></dc:creator><pubDate>Sat, 04 Feb 2006 19:03:39 GMT</pubDate></item></channel></rss>