Solved

Rich Edit Control Steaming

Posted on 1997-12-10
1
248 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a Shell script to start a service checking the port 6 55
Login Script to Copy Folders 12 47
dog bark java program 15 121
wait notify demo infinite loop 3 137
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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