CString doesn't contain any formatting.
I don't know what kind of input you get for your traces.
Can't you just store the input in a buffer instead of directly in the richedit?