问题解决:
====存储:
TMemoryStream* ms = new TMemoryStream;
RichEdit->Lines->SaveToStream(ms);
String s = (char*)(ms->Memory);
s = StringReplace(s, "//", "|", TReplaceFlags() << rfReplaceAll);
PostDocumentContents(...);
===读取:
content = StringReplace(content, "|", "//", TReplaceFlags() << rfReplaceAll);
RichEdit->Text = content;
但是,有更好的办法吗?