The EDITSTREAM structure contains information about a data stream used with a rich edit control.
typedef struct _editstream {
DWORD dwCookie;
DWORD dwError;
EDITSTREAMCALLBACK pfnCallback;
} EDITSTREAM;
Members
dwCookie
Application-defined value that is passed to the callback function.
dwError
Error encountered while streaming. If there was no error, this member is zero.
pfnCallback
Pointer to an application-defined function that the control calls to transfer data.
This structure is used with the EM_STREAMIN message to read (stream in) data into a rich edit control, replacing its contents. It is used with the EM_STREAMOUT message to write (stream out) the contents of a rich edit control.
The control calls the callback function repeatedly, transferring a portion of the data with each call. The callback function has the following form:
DWORD CALLBACK EditStreamCallback(DWORD dwCookie,
LPBYTE pbBuff, LONG cb, LONG FAR *pcb);
dwCookie
Value of the dwCookie member of the EDITSTREAM structure.
pbBuff
Pointer to the buffer to read from or write to.
cb
Count of bytes to read or write.
pcb
Pointer to a variable that receives the number of bytes actually read or written.
Return Value
The return value is zero to continue to the stream operation, or nonzero to abort it.
See Also