Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MDI Application using CRichText?? Or getting over the 64k Cedit limitation

Posted on 1998-08-21
4
Medium Priority
?
349 Views
Last Modified: 2013-11-20
I am trying to create a program similar to notepad or Superpad that is one of MFC's examples but I NEED to open multiple file that are (most of the time) over 64k. I have been writting windows apps for about 5 years now in C and I am trying to get myself to move to MFC but are running into some pretty BIG walls. If someone can point me to some answer or sample code that would be great!

THANKS!!!!
0
Comment
Question by:pocono
[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
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1321145
CEdit depends on the Windows edit control.  Under WIn95/98 this only supports 64K of text (it eventually uses the 16 bit version in the 16 bit version of USER).  Under NT you should be able to go past 64K with this control.

Consider using the rich edit view, for write your own.  For a sample of the former see WORDPAD sample on MSDN CD (this is the same program that comes with Windows) or look at

Programming Windows 95 with MFC
by Jeff Prosise
Microsoft Press 1996
ISBN 1-55615-902-1

(this is an excellent book anyway).

An excellent site is http://www.codeguru.com with tonnes of MFC samples


0
 

Author Comment

by:pocono
ID: 1321146
I was wonder can the richedit control be used in a MDI application, I have yet seen it used for mulitiple docs??
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1321147
Yes - I've done it in my own s/w (and don't remember any wierd stuff that I had to work round - I think it all worked as expected - my apps actually had multiple RichEds, multiple form views & several other types too).

You need to make sure your views are are from CRichEditView, your docs from CRichEditDoc (pp758 in the above book) and if you get the hierachy right it should all work first time.  I have also tried splitters (multiple CRichEditViews on each CRichEditDoc, and this seems to work too - again I can't recall any problems).

If I find a sample that I'm free to give out, I'll post additional comments or a link.
0
 

Author Comment

by:pocono
ID: 1321148
Hi, Thanks!

I was just working on the RichEdit stuff today, I used RichEdit view and RichEditDoc and things were weird the cut and copy buttons where disabled some of the time when they should have been enabled and enabled when they should have been disabled. Like I said MFC is new to me and I know I can only take about a week or more of fighting with MFC before I go back api programming with straight C :)! But if you can find some samples that would be great!

Thanks again
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

604 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