Solved

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

Posted on 2008-06-12
6
282 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
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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 …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

828 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