AnnRTFText example for Delphi
// This sample loads a rich text annotation object with text
//It illustrates how AnnRTFText can treat the text as Rich Text, or plain text
// hObject: the Rich Text annotation object
// uFormat: the format of the retrieved text--one of
// RTFFORMAT_TEXT
// RTFFORMAT_RTF
Procedure TForm1.ExampleAnnRTFText ( hObject: HANNOBJECT; uFormat: L_UINT);
var
strText: String;
strFormat: String;
begin
Case uFormat of
RTFFORMAT_TEXT:
strFormat:= 'Format: RTFFORMAT_TEXT';
RTFFORMAT_RTF:
strFormat:= 'Format: RTFFORMAT_RTF';
end;
strText:= LEADAnn1.AnnRTFText[hObject, uFormat];
Application.MessageBox ( PChar(strText), PChar(strFormat), MB_OK );
end;