Solved

Rich Edit Control Steaming

Posted on 1997-12-10
1
238 Views
Last Modified: 2013-11-20
I would like to know how to stream the data that is there in the Rich Edit Control . Please Help.
I am using the CRichEditView class as a base class for the application's view
0
Comment
Question by:Vijendra
1 Comment
 
LVL 1

Accepted Solution

by:
2good earned 50 total points
ID: 1311994
Use the GetRichEditCtrl() member function of the view to access the list control. Use the control's StreamIn and StreamOut functions and make a callback.

It could look something like this...

DWORD CALLBACK EditStreamCallback_Read(DWORD dwCookie,
    LPBYTE pbBuff, LONG cb, LONG FAR *pcb)
{
    CFile * pfile = (CFile *)dwCookie;

      pfile->Read(pbBuff, cb);
      *pcb = cb;

    return 0;
}

void CTheView::SaveToFile(CFile & file)
{
      EDITSTREAM es =
      {
            (DWORD)&file,
            0,
            EditStreamCallback_Read            
      };    

      GetRichEditCtrl().StreamOut(SF_RTF, &es)
}
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 35
Unix / Linux grid computing 5 157
maxBlock challenge 30 129
ShiftLeft challenge 21 82
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question