EM_STREAMIN

The EM_STREAMIN message replaces the contents of a rich edit control with a stream of data provided by an application-defined EditStreamCallback callback function.

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

Parameters

uFormat
A set of bit flags that indicate the data format and replacement options. This value must specify one of the following data formats.
Value Meaning
SF_TEXT Text
SF_RTF Rich Text Format (RTF)

In addition, you can specify the following flags.
Value Meaning
SFF_SELECTION The data stream replaces the contents of the current selection. If this flag is not specified, the data stream replaces the entire contents of the control. You can combine this flag with the SF_TEXT or SF_RTF flags.
SFF_PLAINRTF Language-specific RTF keywords in the stream are ignored. Only keywords common to all languages are streamed in. You can combine this flag with the SF_RTF flag.
SF_UNICODE Rich Edit 2.0: Indicates Unicode text. You can combine this flag with the SF_TEXT flag.

lpStream
Pointer to an EDITSTREAM structure. On input, the pfnCallback member of this structure must point to an application-defined EditStreamCallback function. On output, the dwError member can contain a nonzero error code if an error occurred.

Return Values

Returns the number of characters read.

Remarks

When you send an EM_STREAMIN message, the rich edit control makes repeated calls to the EditStreamCallback function specified by the pfnCallback member of the EDITSTREAM structure. Each time the callback function is called, it fills a buffer with data to read into the control. This continues until the callback function indicates that the stream-in operation has been completed or an error occurs.

QuickInfo

  Windows NT: Requires version 3.51 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in richedit.h.

See Also

Rich Edit Controls Overview, Rich Edit Messages, EDITSTREAM, EditStreamCallback, EM_STREAMOUT