How to insert text to rich edit control in Win32 while preserving any previous formatting
<p>I'm developing chat application in win32. Currently i'm dynamically allocating memory for rich edit controls text, append new line and set the new text with SetWindowText.</p>

<p>When a message arrives with specific keywords the app colors the line and appends it to the chat window. Everything's fine. Problem arises when next message is received - any previous formatting is lost!</p>

<p>How to solve this issue?</p>
