Solved

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

Posted on 2000-04-20
3
267 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
[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
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.

740 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