Solved

How to read/write text files > 32K ?

Posted on 1997-06-26
3
201 Views
Last Modified: 2013-11-19
I am using CEditView as my primary text editing control, problem is, if  I use the default serialization code,
((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);

It can only read up to 32KB file size.

How should I do to write a simple editor that can read/write unlimited file size?

I am thinking of taking out the serialization code and use CFile's read/write classes to perform the I/O stuff.  But then I don't know how to let MFC update the window text when reading a file, or write the window's content to a file.

Any ideas?
I am using VC++ 4.2 + Windows 95.
0
Comment
Question by:zrokool
3 Comments
 
LVL 4

Expert Comment

by:mbhakta
ID: 1302335
What version of VC++, OS are you working on ?
0
 

Author Comment

by:zrokool
ID: 1302336
Edited text of question
0
 

Accepted Solution

by:
bola053097 earned 150 total points
ID: 1302337
Have you tried the RichEditCtrl? It basically contains functions
that are a superset of the CEdit control and your code should
be able to run using the RichEditCtrl with very minor modifications.

Of course, it can read files of unlimited sizes...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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. …
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now