Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-12
6
Medium Priority
?
307 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 2000 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 11

Expert Comment

by:Deepu Abraham
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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

782 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