Solved

How to read the contents of .txt,.doc,.Html.or.htm into RichEdit Controls using MFC?

Posted on 2008-06-12
6
289 Views
Last Modified: 2013-12-04
Question:
I  am developing an application,for that  i need to read the data that is present in .doc,.txt,.Html,.htm file(Whichever the user specifies) into the  RichEditControl using MFC.I have tried reading the data of the file using CStdioFile class,but if i read the .doc using CStdioFile the binary format of the data ia appearing.
0
Comment
Question by:Rajeshm8484
[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
  • 2
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21776227
well, you cannot avoid this by reading in a raw fashion. You will have to read it through automation.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 21776250
0
 

Author Comment

by:Rajeshm8484
ID: 21776314
Using Automation concept can i read any type of file(.html,.htm,.doc,.txt),if so  can u give some tips to perform because i am new to automation.In RichEdit Control can i display the contents of .doc file or any file simultaneously by drawing the thick line between the datas of two files
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 11

Expert Comment

by:DeepuAbrahamK
ID: 21777281
Follow the link: This will probably help how to use the RichEditCtrl.
(although it is in c#)
http://www.codeproject.com/KB/cs/getwordtext.aspx

0
 

Author Closing Comment

by:Rajeshm8484
ID: 31466828
I helped me a lot,Thanks.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21780299
automation will allow to read some files by talking with an application that support OLE automation. In this case, you can make Word to read the files (doc, txt, html), and the ask it to give you all the text.
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

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 …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
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.

710 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