<?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[Schriftart und Richedit Problem]]></title><description><![CDATA[<p>Also mein Richedit hab ich so erstellt</p>
<pre><code class="language-cpp">HWND richedit = CreateWindowEx(WS_EX_WINDOWEDGE,RICHEDIT_CLASS,&quot;&quot;,WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOVSCROLL|WS_VSCROLL,chatlogposX,chatlogposY,chatlogWidth,chatlogHeight,hDlg,NULL,GetModuleHandle(NULL),NULL);
</code></pre>
<p>und</p>
<pre><code class="language-cpp">void AddText(HWND hEdit, const char *text, int r, int g, int b)
{
	char *cpyText = (char *)malloc(strlen(text) + 10);
	sprintf(cpyText, &quot;%s\n&quot;, text);
	int nCpyText = strlen(cpyText);

	CHARFORMAT cfSysText;
	ZeroMemory(&amp;cfSysText, sizeof(CHARFORMAT));
	cfSysText.cbSize = sizeof(CHARFORMAT);
	cfSysText.dwMask = CFM_COLOR | CFM_SIZE;
	cfSysText.crTextColor = RGB(r, g, b);
	cfSysText.bCharSet = DEFAULT_CHARSET;
	cfSysText.bPitchAndFamily = DEFAULT_PITCH;
	cfSysText.yHeight = 32; 
	strcpy(cfSysText.szFaceName, &quot;Arial&quot;);

	int nLength = GetWindowTextLength(hEdit);
	SendMessage(hEdit, EM_SETSEL, nLength, nLength);
	SendMessage(hEdit, EM_REPLACESEL, FALSE, (LPARAM)cpyText);
	SendMessage(hEdit, EM_SETSEL, nLength, nLength + nCpyText);
	SendMessage(hEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;cfSysText);
	SendMessage(hEdit, EM_SETSEL, nLength + nCpyText, nLength + nCpyText);

	free(cpyText);
}
</code></pre>
<p>Aber er zeigt mir nie Arial an ! Immer nur die Schrift art &quot;System&quot; ..</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/160063/schriftart-und-richedit-problem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 06:04:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/160063.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Sep 2006 15:24:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Schriftart und Richedit Problem on Thu, 21 Sep 2006 15:24:41 GMT]]></title><description><![CDATA[<p>Also mein Richedit hab ich so erstellt</p>
<pre><code class="language-cpp">HWND richedit = CreateWindowEx(WS_EX_WINDOWEDGE,RICHEDIT_CLASS,&quot;&quot;,WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOVSCROLL|WS_VSCROLL,chatlogposX,chatlogposY,chatlogWidth,chatlogHeight,hDlg,NULL,GetModuleHandle(NULL),NULL);
</code></pre>
<p>und</p>
<pre><code class="language-cpp">void AddText(HWND hEdit, const char *text, int r, int g, int b)
{
	char *cpyText = (char *)malloc(strlen(text) + 10);
	sprintf(cpyText, &quot;%s\n&quot;, text);
	int nCpyText = strlen(cpyText);

	CHARFORMAT cfSysText;
	ZeroMemory(&amp;cfSysText, sizeof(CHARFORMAT));
	cfSysText.cbSize = sizeof(CHARFORMAT);
	cfSysText.dwMask = CFM_COLOR | CFM_SIZE;
	cfSysText.crTextColor = RGB(r, g, b);
	cfSysText.bCharSet = DEFAULT_CHARSET;
	cfSysText.bPitchAndFamily = DEFAULT_PITCH;
	cfSysText.yHeight = 32; 
	strcpy(cfSysText.szFaceName, &quot;Arial&quot;);

	int nLength = GetWindowTextLength(hEdit);
	SendMessage(hEdit, EM_SETSEL, nLength, nLength);
	SendMessage(hEdit, EM_REPLACESEL, FALSE, (LPARAM)cpyText);
	SendMessage(hEdit, EM_SETSEL, nLength, nLength + nCpyText);
	SendMessage(hEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;cfSysText);
	SendMessage(hEdit, EM_SETSEL, nLength + nCpyText, nLength + nCpyText);

	free(cpyText);
}
</code></pre>
<p>Aber er zeigt mir nie Arial an ! Immer nur die Schrift art &quot;System&quot; ..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1141959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1141959</guid><dc:creator><![CDATA[PhoeNix_FasT]]></dc:creator><pubDate>Thu, 21 Sep 2006 15:24:41 GMT</pubDate></item><item><title><![CDATA[Reply to Schriftart und Richedit Problem on Thu, 21 Sep 2006 20:07:32 GMT]]></title><description><![CDATA[<p>Wie siehts aus mit den Return-Werten ? Speziell von:</p>
<pre><code class="language-cpp">SendMessage(hEdit, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;cfSysText);
</code></pre>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142198</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142198</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Thu, 21 Sep 2006 20:07:32 GMT</pubDate></item><item><title><![CDATA[Reply to Schriftart und Richedit Problem on Thu, 21 Sep 2006 22:28:30 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">cfSysText.dwMask = CFM_BOLD | CFM_COLOR | CFM_SIZE | CFM_FACE;
</code></pre>
<p>jetzt gehts</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1142251</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1142251</guid><dc:creator><![CDATA[PhoeNix_FasT]]></dc:creator><pubDate>Thu, 21 Sep 2006 22:28:30 GMT</pubDate></item></channel></rss>