?
Solved

Rich Edit Control Steaming

Posted on 1997-12-10
1
Medium Priority
?
269 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seveā€¦
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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 is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

719 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