<?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[CDC::DrawDragRect für Kreise?]]></title><description><![CDATA[<p>Hi Leute,<br />
Ich versuche gerade mehr oder weniger verzweifelt eine Funktion für Kreise zu machen, die analog zu CDC::DrawDragRect arbeitet. Also eine Funktion, die so einen gestrichelten Kreis malt. Ich hab mir den Quellcode von DrawDragRect angeschaut, aber der hilft mir nicht weiter, weil er mit CRgn arbeitet und die sind ja bekanntlich viereckig ... Jemand ne Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/84999/cdc-drawdragrect-für-kreise</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 07:11:09 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/84999.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Sep 2004 14:23:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CDC::DrawDragRect für Kreise? on Sat, 04 Sep 2004 14:23:28 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
Ich versuche gerade mehr oder weniger verzweifelt eine Funktion für Kreise zu machen, die analog zu CDC::DrawDragRect arbeitet. Also eine Funktion, die so einen gestrichelten Kreis malt. Ich hab mir den Quellcode von DrawDragRect angeschaut, aber der hilft mir nicht weiter, weil er mit CRgn arbeitet und die sind ja bekanntlich viereckig ... Jemand ne Idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/599431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599431</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sat, 04 Sep 2004 14:23:28 GMT</pubDate></item><item><title><![CDATA[Reply to CDC::DrawDragRect für Kreise? on Sat, 04 Sep 2004 14:30:35 GMT]]></title><description><![CDATA[<p>Ok, ok ... Regionen sind nicht nur viereckig ...</p>
<p>Hier der Code:</p>
<pre><code class="language-cpp">void CCircleOb::DrawDragCircle(CDC* pDC, CRect rect)
{
	CBrush *pBrush=NULL;
	LPCRECT lpRect=rect;
	SIZE size = CSize(2,2);

	// first, determine the update region and select it
	CRgn rgnNew;
	CRgn rgnOutside, rgnInside;
	rgnOutside.CreateEllipticRgnIndirect(lpRect);
	rect = *lpRect;
	rect.InflateRect(-size.cx, -size.cy);
	rect.IntersectRect(rect, lpRect);
	rgnInside.CreateEllipticRgnIndirect(rect);
	rgnNew.CreateEllipticRgn(0,0,0,0);
	rgnNew.CombineRgn(&amp;rgnOutside, &amp;rgnInside, RGN_XOR);

	CBrush* pBrushOld = NULL;
	pBrush = CDC::GetHalftoneBrush();

	// draw into the update/new region
	pDC-&gt;SelectClipRgn(&amp;rgnNew);
	pDC-&gt;GetClipBox(&amp;rect);
	pBrushOld = pDC-&gt;SelectObject(pBrush);
	pDC-&gt;PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATINVERT);

	// cleanup DC
	if (pBrushOld != NULL)
		pDC-&gt;SelectObject(pBrushOld);
	pDC-&gt;SelectClipRgn(NULL);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/599439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/599439</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Sat, 04 Sep 2004 14:30:35 GMT</pubDate></item></channel></rss>