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

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.
Rajeshm8484Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Jaime OlivaresConnect With a Mentor Software ArchitectCommented:
0
 
Jaime OlivaresSoftware ArchitectCommented:
well, you cannot avoid this by reading in a raw fashion. You will have to read it through automation.
0
 
Rajeshm8484Author Commented:
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
Deepu AbrahamR & D Engineering ManagerCommented:
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
 
Rajeshm8484Author Commented:
I helped me a lot,Thanks.
0
 
Jaime OlivaresSoftware ArchitectCommented:
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
All Courses

From novice to tech pro — start learning today.