Акжан в сети - На уровень вверх(W32, VCL) Как вставить в нужное место Rich Text в TRichEdit?

Вы можете послать сообщение EM_STREAMIN с параметром SFF_SELECTION методом Perform для замены текущего Selection. Выдержка из Help:

EM_STREAMIN
wParam = (WPARAM) (UINT) uFormat; // Integer
lParam = (LPARAM) (EDITSTREAM FAR *) lpStream; // EDITSTREAM^

The EM_STREAMIN message replaces the contents of a rich edit control with the
specified data stream.

Parameters

uFormat

One of the following data formats, optionally combined with the SFF_SELECTION
flag:

Value Meaning
SF_TEXT Text
SF_RTF Rich-text format
If the SFF_SELECTION flag is specified, the stream replaces the contents of the
current selection. Otherwise, the stream replaces the entire contents of the
control.

lpStream

Pointer to an EDITSTREAM structure. The control reads (streams in) the data by 
repeatedly calling the function specified by the structure's pfnCallback
member.

Return Value

Returns the number of characters read.

Mikhail Chernyshev

Mikhail-Chernyshev@usa.net (2:4615/26)