Solved

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

Posted on 2000-04-20
3
264 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
ID: 2736733
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
ID: 2736947
The MFC sample WORDPAD shows how to use the CRichEditView.
0
 
LVL 3

Accepted Solution

by:
SamHobbs earned 100 total points
ID: 2740473
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

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

895 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

11 Experts available now in Live!

Get 1:1 Help Now