<?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[EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :(]]></title><description><![CDATA[<p>moin<br />
habe hier iene function, die den text farbin darstellen sol, und zwar immer den letzen hinzugefügten text:</p>
<pre><code class="language-cpp">int send_msg(char * text, char * txt)
{
/* txt ist der vroherige inhalt, text ist der neue inhalt ;) */
    /* Formatierung vorbereiten */
    CHARFORMAT format;
    format.cbSize = sizeof(CHARFORMAT);
    format.dwMask  = CFM_COLOR;
    format.crTextColor = RGB(255, 255, 255);
    format.dwEffects = CFE_BOLD;
    /* Den Text ausgäben */
    SendMessage(hMsg, WM_SETTEXT, 0, (ULONG)&quot;&quot;); // Textfiel von hMsg leeren
    SendMessage(hChat, WM_SETTEXT, 0, (ULONG)strcat(strcat(txt, text), &quot;\r\n&quot;)); // text hinzufügen
    SendMessage(hChat, EM_SETSEL, (WPARAM)sizeof(txt)-1, (LPARAM)(sizeof(txt)-1)+(sizeof(text)-1)); // text auswählen
    SendMessage(hChat, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;format); // Farbe setzen
    SendMessage(hChat, EM_SCROLL, SB_PAGEDOWN, 0); // Scrollen nach unten
    SetFocus(hMsg); // Focus setzen
    return 0;    
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/140318/em_setsel-bzw-em_setcharformat-geht-nicht</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 03:48:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/140318.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 13 Mar 2006 21:09:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :( on Mon, 13 Mar 2006 21:09:06 GMT]]></title><description><![CDATA[<p>moin<br />
habe hier iene function, die den text farbin darstellen sol, und zwar immer den letzen hinzugefügten text:</p>
<pre><code class="language-cpp">int send_msg(char * text, char * txt)
{
/* txt ist der vroherige inhalt, text ist der neue inhalt ;) */
    /* Formatierung vorbereiten */
    CHARFORMAT format;
    format.cbSize = sizeof(CHARFORMAT);
    format.dwMask  = CFM_COLOR;
    format.crTextColor = RGB(255, 255, 255);
    format.dwEffects = CFE_BOLD;
    /* Den Text ausgäben */
    SendMessage(hMsg, WM_SETTEXT, 0, (ULONG)&quot;&quot;); // Textfiel von hMsg leeren
    SendMessage(hChat, WM_SETTEXT, 0, (ULONG)strcat(strcat(txt, text), &quot;\r\n&quot;)); // text hinzufügen
    SendMessage(hChat, EM_SETSEL, (WPARAM)sizeof(txt)-1, (LPARAM)(sizeof(txt)-1)+(sizeof(text)-1)); // text auswählen
    SendMessage(hChat, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&amp;format); // Farbe setzen
    SendMessage(hChat, EM_SCROLL, SB_PAGEDOWN, 0); // Scrollen nach unten
    SetFocus(hMsg); // Focus setzen
    return 0;    
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1015721</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015721</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Mon, 13 Mar 2006 21:09:06 GMT</pubDate></item><item><title><![CDATA[Reply to EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :( on Mon, 13 Mar 2006 21:11:30 GMT]]></title><description><![CDATA[<p>wei kann ich das jetzt machen, dass er den text in der variable text farbin hinzufügt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1015725</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015725</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Mon, 13 Mar 2006 21:11:30 GMT</pubDate></item><item><title><![CDATA[Reply to EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :( on Tue, 14 Mar 2006 05:51:28 GMT]]></title><description><![CDATA[<p>Ich glaube, du bist im Irrtum darüber, was sizeof tut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1015786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015786</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Tue, 14 Mar 2006 05:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :( on Tue, 14 Mar 2006 08:39:51 GMT]]></title><description><![CDATA[<p>strlen !?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1015832</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1015832</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 14 Mar 2006 08:39:51 GMT</pubDate></item><item><title><![CDATA[Reply to EM_SETSEL bzw EM_SETCHARFORMAT geht nicht :( on Tue, 14 Mar 2006 12:47:00 GMT]]></title><description><![CDATA[<p>ohh, stimmt ich bin blöd ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1016014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1016014</guid><dc:creator><![CDATA[tütü]]></dc:creator><pubDate>Tue, 14 Mar 2006 12:47:00 GMT</pubDate></item></channel></rss>