Question on DIsplaying a File

I have a dialog box and i want to display the contents of a help file within the dialog box. I am currently trying Cstdio::Open and if that fails I use CFile::Read to read some of it into a string and display that in a seperate message box(which is undesireable).

Is there a way to make CStdio::Open display the file in the current dialog box and if not is there a function that will display the entire help file in the dialog box?
hrasheedAsked:
Who is Participating?
 
AxterConnect With a Mentor Commented:
I don't understand your question.

Are you trying to avoid using CFile::Read?

Please explain exactly what you want to do.
0
 
hrasheedAuthor Commented:
duplicate
0
 
hrasheedAuthor Commented:
yes, I am trying to avoid using CFile::Read (because I would have to use a seperate messagebox to display whatever i read out of the file).  The help file is opened via a button click in a dialog box, and I am trying to find out if CStdio::Open will/is able to display the contents of the help file within that dialog box or, if there is another function that will do that.
0
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.

 
AxterCommented:
>>I am trying to find out if CStdio::Open will/is able to
>>display the contents of the help file within that dialog
>>box or, if there is another function that will do that.

No.  CStdio::Open by itself can not display the contents of the file.

You need to use Read or ReadString in conjunction with CStdio::Open.

If you're having problems with multiple CStdio::Open's calls to the same file, you can close the file after reading the required data, so that other CStdio::Open commands can succeed.
0
 
griesshCommented:
Dear hrasheed

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "Axter"

comment(s) as an answer.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
MindphaserCommented:
Force accepted

** Mindphaser - Community Support Moderator **
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.