Solved

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

Posted on 2008-06-12
6
258 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
Comment Utility
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
Comment Utility
0
 

Author Comment

by:Rajeshm8484
Comment Utility
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 11

Expert Comment

by:DeepuAbrahamK
Comment Utility
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
Comment Utility
I helped me a lot,Thanks.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

762 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

12 Experts available now in Live!

Get 1:1 Help Now