Solved

Open Text File (Doc/View MDI) Class or Info?

Posted on 2000-04-20
3
262 Views
Last Modified: 2013-11-20
I want to be able to open text files in my simple MDI MFC app, using the View/Doc architecture. So i can have lots of windows with different text files in. I only need to view them.

Where can i find the info, example, or classes to show me how to do this? There must be some simple examples about, but i couldnt find any.

The reason i ask is a need to add this ability ASAP. It can v.simple.

Thanks.
0
Comment
Question by:coles01
3 Comments
 
LVL 1

Expert Comment

by:MT_MU
Comment Utility
Use the AppWizard and at the last step - when the wizard is showing you the classes it is about to create - change the ViewClass - to CEditView.

The will additionally give you the ability to edit these files.
0
 
LVL 1

Expert Comment

by:jianliuer
Comment Utility
The MFC sample WORDPAD shows how to use the CRichEditView.
0
 
LVL 3

Accepted Solution

by:
SamHobbs earned 100 total points
Comment Utility
I think that my "Simple CEditView Application" at http://home.socal.rr.com/samhobbs/VC/EditViewApp.html has most of what you are asking for and the
readonly style can probably be added in the PreCreateWindow for CEditView.

I will make a slight enhancement to that soon. It is will be to simply explain that it is very easy to support both "Tile Vertically" and "Tile Horizontally". In fact, by the time you see this, this last enhancement will probably be there too.

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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. …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

9 Experts available now in Live!

Get 1:1 Help Now