Советы по Delphi

         

Как вставить в нужное место Rich Text в TRichEdit?


Nomadic советует:

Вы можете послать сообщение 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. [001142]



Содержание раздела