Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Controls
Control Library
Rich Edit
Messages
 EM_STREAMIN Message

  Switch on low bandwidth view
EM_STREAMIN Message

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.

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 defined–EditStreamCallback 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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker