<?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[Font setzen bei abgeleitetem CEdit?]]></title><description><![CDATA[<p>Ich habe eine Klasse abgeleitet, wo CEdit die Basisklasse ist. Nur die Schriftart bekomme ich nicht auf Courier New geändert.</p>
<p>Das geht nicht:</p>
<pre><code class="language-cpp">font.DeleteObject();

	font.CreateFont(16,                         // nHeight
					0,                          // nWidth
					0,                          // nEscapement
					0,                          // nOrientation
					FW_NORMAL,                  // nWeight
					FALSE,                      // bItalic
					FALSE,                      // bUnderline
					0,                          // cStrikeOut
					ANSI_CHARSET,               // nCharSet
					OUT_TT_PRECIS,              // nOutPrecision
					CLIP_DEFAULT_PRECIS,        // nClipPrecision
					PROOF_QUALITY,              // nQuality
					FIXED_PITCH | FF_MODERN,    // nPitchAndFamily
					&quot;Courier New&quot;);             // lpszFacename

	this-&gt;SetFont(&amp;font);
	CEdit::OnPaint();
</code></pre>
<p>Und beim Erstellen der Klasse die Zuweisung hilft auch nicht:</p>
<pre><code class="language-cpp">terminal = new CNoEchoEdit();
    terminal-&gt;Create(DS_MODALFRAME | WS_MINIMIZEBOX | ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL | WS_CHILD | WS_VISIBLE, CRect(0, 1, 322, 176), this, IDC_BUFFER);
	CFont font;
	font.CreateFont(16,                         // nHeight
					0,                          // nWidth
					0,                          // nEscapement
					0,                          // nOrientation
					FW_NORMAL,                  // nWeight
					FALSE,                      // bItalic
					FALSE,                      // bUnderline
					0,                          // cStrikeOut
					ANSI_CHARSET,               // nCharSet
					OUT_TT_PRECIS,              // nOutPrecision
					CLIP_DEFAULT_PRECIS,        // nClipPrecision
					PROOF_QUALITY,              // nQuality
					FIXED_PITCH | FF_MODERN,    // nPitchAndFamily
					&quot;Courier New&quot;);             // lpszFacename
    terminal-&gt;SetFont( &amp;font, true );
</code></pre>
<p>In der Basisklasse, also wenn ich nur CEdit verwende, dann funktioniert das mit OnPaint.</p>
<p>Danke,<br />
Micha</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/69348/font-setzen-bei-abgeleitetem-cedit</link><generator>RSS for Node</generator><lastBuildDate>Sat, 02 May 2026 02:06:56 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/69348.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Mar 2004 14:54:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Font setzen bei abgeleitetem CEdit? on Fri, 26 Mar 2004 14:54:49 GMT]]></title><description><![CDATA[<p>Ich habe eine Klasse abgeleitet, wo CEdit die Basisklasse ist. Nur die Schriftart bekomme ich nicht auf Courier New geändert.</p>
<p>Das geht nicht:</p>
<pre><code class="language-cpp">font.DeleteObject();

	font.CreateFont(16,                         // nHeight
					0,                          // nWidth
					0,                          // nEscapement
					0,                          // nOrientation
					FW_NORMAL,                  // nWeight
					FALSE,                      // bItalic
					FALSE,                      // bUnderline
					0,                          // cStrikeOut
					ANSI_CHARSET,               // nCharSet
					OUT_TT_PRECIS,              // nOutPrecision
					CLIP_DEFAULT_PRECIS,        // nClipPrecision
					PROOF_QUALITY,              // nQuality
					FIXED_PITCH | FF_MODERN,    // nPitchAndFamily
					&quot;Courier New&quot;);             // lpszFacename

	this-&gt;SetFont(&amp;font);
	CEdit::OnPaint();
</code></pre>
<p>Und beim Erstellen der Klasse die Zuweisung hilft auch nicht:</p>
<pre><code class="language-cpp">terminal = new CNoEchoEdit();
    terminal-&gt;Create(DS_MODALFRAME | WS_MINIMIZEBOX | ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL | WS_CHILD | WS_VISIBLE, CRect(0, 1, 322, 176), this, IDC_BUFFER);
	CFont font;
	font.CreateFont(16,                         // nHeight
					0,                          // nWidth
					0,                          // nEscapement
					0,                          // nOrientation
					FW_NORMAL,                  // nWeight
					FALSE,                      // bItalic
					FALSE,                      // bUnderline
					0,                          // cStrikeOut
					ANSI_CHARSET,               // nCharSet
					OUT_TT_PRECIS,              // nOutPrecision
					CLIP_DEFAULT_PRECIS,        // nClipPrecision
					PROOF_QUALITY,              // nQuality
					FIXED_PITCH | FF_MODERN,    // nPitchAndFamily
					&quot;Courier New&quot;);             // lpszFacename
    terminal-&gt;SetFont( &amp;font, true );
</code></pre>
<p>In der Basisklasse, also wenn ich nur CEdit verwende, dann funktioniert das mit OnPaint.</p>
<p>Danke,<br />
Micha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/489505</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/489505</guid><dc:creator><![CDATA[MHX]]></dc:creator><pubDate>Fri, 26 Mar 2004 14:54:49 GMT</pubDate></item></channel></rss>