<?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[Zeichnen funktioniert nicht]]></title><description><![CDATA[<p>Ich habe in meiner Dialog-Anwendung ein Picture-Control eingebaut. Nun möchte ich darin zeichen, es funktioniert aber nicht. Fehler kommen keine, Striche aber auch nicht, geschweige denn, dass die Fläche schwarz gefüllt würde.</p>
<pre><code class="language-cpp">bool CGraphics::DrawChart(CDatenstruktur *DataSet, CWnd *DrawHandle, const int typ)
{	
    LPRECT PaintRect = new RECT;

    CPen penGreen(PS_SOLID, 1, RGB(0,20,0));

    CPaintDC dc(DrawHandle);
    DrawHandle-&gt;GetWindowRect(PaintRect);

    CRgn rgn;
    rgn.CreateRectRgnIndirect((LPCRECT)&amp;PaintRect);
    dc.SelectClipRgn(&amp;rgn);

    dc.FillSolidRect(PaintRect, 0x00000000);

    dc.SelectObject(&amp;penGreen);
    dc.MoveTo(200, 300);
    dc.LineTo(400, 400);
}
</code></pre>
<p>DrawHandle ist vom Typ CWnd* und gefüllt mit GetDlgItem(IDC_GRAPH_AREA_RES_SINGLE). IDC_GRAPH_AREA_RES_SINGLE ist die ID des Picture Control.</p>
<p>Danke für die Hilfe.</p>
<p>zwette</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/47956/zeichnen-funktioniert-nicht</link><generator>RSS for Node</generator><lastBuildDate>Tue, 28 Apr 2026 03:46:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/47956.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Sep 2003 19:47:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeichnen funktioniert nicht on Thu, 04 Sep 2003 07:21:08 GMT]]></title><description><![CDATA[<p>Ich habe in meiner Dialog-Anwendung ein Picture-Control eingebaut. Nun möchte ich darin zeichen, es funktioniert aber nicht. Fehler kommen keine, Striche aber auch nicht, geschweige denn, dass die Fläche schwarz gefüllt würde.</p>
<pre><code class="language-cpp">bool CGraphics::DrawChart(CDatenstruktur *DataSet, CWnd *DrawHandle, const int typ)
{	
    LPRECT PaintRect = new RECT;

    CPen penGreen(PS_SOLID, 1, RGB(0,20,0));

    CPaintDC dc(DrawHandle);
    DrawHandle-&gt;GetWindowRect(PaintRect);

    CRgn rgn;
    rgn.CreateRectRgnIndirect((LPCRECT)&amp;PaintRect);
    dc.SelectClipRgn(&amp;rgn);

    dc.FillSolidRect(PaintRect, 0x00000000);

    dc.SelectObject(&amp;penGreen);
    dc.MoveTo(200, 300);
    dc.LineTo(400, 400);
}
</code></pre>
<p>DrawHandle ist vom Typ CWnd* und gefüllt mit GetDlgItem(IDC_GRAPH_AREA_RES_SINGLE). IDC_GRAPH_AREA_RES_SINGLE ist die ID des Picture Control.</p>
<p>Danke für die Hilfe.</p>
<p>zwette</p>
]]></description><link>https://www.c-plusplus.net/forum/post/346731</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/346731</guid><dc:creator><![CDATA[zwette]]></dc:creator><pubDate>Thu, 04 Sep 2003 07:21:08 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichnen funktioniert nicht on Thu, 04 Sep 2003 09:09:40 GMT]]></title><description><![CDATA[<p>Nach stundenlangem Rumprobieren hab ich die Lösung gefunden:</p>
<pre><code class="language-cpp">// CPaintDC dc(DrawHandle); 
CClientDC dc(DrawHandle);
</code></pre>
<p>Fragt mich aber nicht, warum das so ist.</p>
<p>zwette</p>
]]></description><link>https://www.c-plusplus.net/forum/post/346954</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/346954</guid><dc:creator><![CDATA[zwette]]></dc:creator><pubDate>Thu, 04 Sep 2003 09:09:40 GMT</pubDate></item><item><title><![CDATA[Reply to Zeichnen funktioniert nicht on Thu, 04 Sep 2003 10:01:31 GMT]]></title><description><![CDATA[<blockquote>
<p>Fragt mich aber nicht, warum das so ist.</p>
</blockquote>
<p>Wenn man mal in die MSDN schauen würden, könnte man folgendes lesen:</p>
<blockquote>
<p>The CPaintDC class is a device-context class derived from CDC. It performs a CWnd::BeginPaint at construction time and CWnd::EndPaint at destruction time.</p>
<p>A CPaintDC object can only be used when responding to a WM_PAINT message, usually in your OnPaint message-handler member function.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/346992</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/346992</guid><dc:creator><![CDATA[MSDN]]></dc:creator><pubDate>Thu, 04 Sep 2003 10:01:31 GMT</pubDate></item></channel></rss>