2011-07-16 2 views

答えて

0

あなたはフォーマットさテキスト(RTF)とTMemoBufにRTFテキストを読み込むために使用TMemoBuf.RTFLoadFromStream機能を取得するためにTRichEditコンポーネントからLines.SaveToStream機能を使用する必要があります。

var 
    MemoryStream: TMemoryStream; 
begin 
    MemoryStream:= TMemoryStream.Create; 
    try 
    //get the rtf data from the RichEdit into from the Memory stream 
    RichEdit1.Lines.SaveToStream(MemoryStream); 
    MemoryStream.Position := 0; 
    //load the rtf data into the TMemoBuf 
    MemoBuf1.RTFLoadFromStream(MemoryStream,0); 
    finally 
    MemoryStream.Free; 
    end; 
end; 
関連する問題