<?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[Handle ergattern]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich in einem erstellten MFC Programm den Handel bekommen.<br />
Wenn ich ein Programm selbst schreibe mache ich dass mit:</p>
<p>HDC hdc;</p>
<p>hdc = GetDC(hwnd);</p>
<p>...</p>
<p>ReleaseDC (hwnd, hdc);</p>
<p>Doch leider kennt das von MFC erstellte Programm hwnd nicht.<br />
Wie soll ich dass machen??</p>
<p>Gruß<br />
Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/80390/handle-ergattern</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 02:59:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/80390.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jul 2004 18:51:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 18:51:48 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann ich in einem erstellten MFC Programm den Handel bekommen.<br />
Wenn ich ein Programm selbst schreibe mache ich dass mit:</p>
<p>HDC hdc;</p>
<p>hdc = GetDC(hwnd);</p>
<p>...</p>
<p>ReleaseDC (hwnd, hdc);</p>
<p>Doch leider kennt das von MFC erstellte Programm hwnd nicht.<br />
Wie soll ich dass machen??</p>
<p>Gruß<br />
Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564681</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564681</guid><dc:creator><![CDATA[frostie]]></dc:creator><pubDate>Tue, 20 Jul 2004 18:51:48 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 19:00:04 GMT]]></title><description><![CDATA[<p>Ich glaube du meinst das :</p>
<pre><code>CDC* pDC = hwnd-&gt;GetDC();
</code></pre>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564688</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:00:04 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 19:01:58 GMT]]></title><description><![CDATA[<p>Das funzt so net:</p>
<p>error C2065: 'hwnd': nichtdeklarierter Bezeichner<br />
error C2227: Der linke Teil von '-&gt;GetDC' muss auf Klasse/Struktur/Union zeigen</p>
<p>Wo kann ich den Händel erfahren? Doch nicht in der OnDraw Funktion oder?</p>
<p>Wenn ich HWND hwnd mache dann kennt er nur die Funktion unused.</p>
<p>Gruß<br />
Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564691</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564691</guid><dc:creator><![CDATA[frostie]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:01:58 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 19:09:51 GMT]]></title><description><![CDATA[<p>Das liegt daran, das GetDC() nur bei CWnd Objekten funktioniert ! (HWND leider nicht)<br />
Was genau möchtest du eigentlich machen ? Willst du das Handle von dem gesamten Programm herausfinden ???</p>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564697</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564697</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 19:29:05 GMT]]></title><description><![CDATA[<p>Ich möchte zB ein Rectangle zeichnen,<br />
dazu brauch ich den hdc.</p>
<p>Wenn ich die Schriftstärke ändern will, muß ich auch den hdc und den hwnd nutzen, oder?</p>
<p>Gruß<br />
Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564714</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564714</guid><dc:creator><![CDATA[frostie]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:29:05 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Tue, 20 Jul 2004 19:38:56 GMT]]></title><description><![CDATA[<p>Und warum benutzt nicht einfach CPen ?<br />
das ist dann kinderleicht !</p>
<pre><code>CDC* pDC = GetDC();
CPen pen(PS_SOLID, 1, RGB(0,0,0)); //Die 1 steht für die Liniendicke !
pDC-&gt;SelectObject(&amp;pen);
pDC-&gt;Rectangle(20,20,20,20);
</code></pre>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564718</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564718</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Tue, 20 Jul 2004 19:38:56 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Wed, 21 Jul 2004 09:04:35 GMT]]></title><description><![CDATA[<p>Das klappt ja schon ganz gut,<br />
aber wie kann ich nun das Rechteck mit zB grau füllen und dann mit nem<br />
schwarzen Text reinschreiben??</p>
<p>Danke</p>
<p>Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564987</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564987</guid><dc:creator><![CDATA[frostie]]></dc:creator><pubDate>Wed, 21 Jul 2004 09:04:35 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Wed, 21 Jul 2004 09:17:56 GMT]]></title><description><![CDATA[<p>Servus,</p>
<p>CDC -&gt; MSDN <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Farbe:<br />
FillRect() Fills a given rectangle by using a specific brush.<br />
FillSolidRect() Fills a rectangle with a solid color.</p>
<p>Text:<br />
TextOut() Writes a character string at a specified location using the currently selected font.</p>
<p>*winke*<br />
Hellsgore</p>
]]></description><link>https://www.c-plusplus.net/forum/post/564999</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/564999</guid><dc:creator><![CDATA[Hellsgore]]></dc:creator><pubDate>Wed, 21 Jul 2004 09:17:56 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Wed, 21 Jul 2004 10:55:35 GMT]]></title><description><![CDATA[<p>Oder du benutzt SelectStockObject :</p>
<pre><code>pDC-&gt;SelectStockObject(GRAY_BRUSH);
</code></pre>
<p>GRAY_BRUSH -&gt; Dunkelgrau<br />
DKGRAY_BRUSH -&gt; Hellgrau<br />
BLACK_BRUSH -&gt; Schwarz</p>
<p>Das muss dann ungefähr so aussehen :</p>
<pre><code>CDC* pDC = GetDC();
CPen pen(PS_SOLID, 5, RGB(0,0,0));
	pDC-&gt;SelectObject(&amp;pen);
	pDC-&gt;SelectStockObject(DKGRAY_BRUSH);
	pDC-&gt;Rectangle(CRect(300,200,50,50));
	pDC-&gt;TextOut(100,100, &quot;Das ist der Text&quot;);
</code></pre>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/565071</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/565071</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Wed, 21 Jul 2004 10:55:35 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Wed, 21 Jul 2004 21:00:15 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/3192">@NoName</a><br />
Das muss dann ungefähr so aussehen :<br />
Code:<br />
CDC* pDC = GetDC();<br />
CPen pen(PS_SOLID, 5, RGB(0,0,0));<br />
pDC-&gt;SelectObject(&amp;pen);<br />
pDC-&gt;SelectStockObject(DKGRAY_BRUSH);<br />
pDC-&gt;Rectangle(CRect(300,200,50,50));<br />
pDC-&gt;TextOut(100,100, &quot;Das ist der Text&quot;);</p>
<p>Warum ist dann der Text von einem weißen Feld umgeben?</p>
<p>Gruß Frostie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/565520</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/565520</guid><dc:creator><![CDATA[frostie]]></dc:creator><pubDate>Wed, 21 Jul 2004 21:00:15 GMT</pubDate></item><item><title><![CDATA[Reply to Handle ergattern on Thu, 22 Jul 2004 11:50:15 GMT]]></title><description><![CDATA[<p>Hmm, das weiss ich leider auch net. Das muss wohl allgemein an der Funktion TextOut() liegen (!) und eine andere Funktion wie TextOut kenne ich leider nicht.</p>
<p>Gruß<br />
:: NoName ::</p>
]]></description><link>https://www.c-plusplus.net/forum/post/565964</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/565964</guid><dc:creator><![CDATA[__NoName__]]></dc:creator><pubDate>Thu, 22 Jul 2004 11:50:15 GMT</pubDate></item></channel></rss>