MSDN Home >  MSDN Library >  User Interface Design and Development >  Windows Shell >  Windows Controls >  Individual Control Information >  Rich Edit Controls > 

EM_STREAMIN Message


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

Syntax

To send this message, call the SendMessage function as follows.
lResult = SendMessage(     // returns LRESULT in lResult
   (HWND) hWndControl,     // handle to destination control
   (UINT) EM_STREAMIN,     // message ID
   (WPARAM) wParam,     // = (WPARAM) () wParam;
   (LPARAM) lParam     // = (LPARAM) () lParam;
);

Parameters

wParam
Specifies the data format and replacement options. This value must be one of the following values.
SF_RTF
Rich Text Format (RTF)
SF_TEXT
Text

In addition, you can specify the following flags.

SFF_PLAINRTF
If specified, only keywords common to all languages are streamed in. Language-specific RTF keywords in the stream are ignored. If not specified, all keywords are streamed in. You can combine this flag with the SF_RTF flag.
SFF_SELECTION
If specified, the data stream replaces the contents of the current selection. If 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.
SF_UNICODE
Microsoft Rich Edit 2.0 and later: Indicates Unicode text. You can combine this flag with the SF_TEXT flag.
lParam
Pointer to an EDITSTREAM structure. On input, the pfnCallback member of this structure must point to an application definedEditStreamCallback function. On output, the dwError member can contain a nonzero error code if an error occurred.

Return Value

This message 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.

Message Information

HeaderDeclared in Richedit.h
Minimum operating systems Windows 95, Windows NT 4.0

See Also

Rich Edit Controls, EDITSTREAM, EditStreamCallback, EM_STREAMOUT
 Contact Us   |  E-Mail this Page   |  MSDN Flash Newsletter
 © 2003 Microsoft Corporation. All rights reserved.   Terms of Use  Privacy Statement   Accessibility