Solved

Question on DIsplaying a File

Posted on 2002-07-09
6
193 Views
Last Modified: 2010-04-01
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?
0
Comment
Question by:hrasheed
6 Comments
 

Author Comment

by:hrasheed
ID: 7141078
duplicate
0
 
LVL 30

Accepted Solution

by:
Axter earned 20 total points
ID: 7141528
I don't understand your question.

Are you trying to avoid using CFile::Read?

Please explain exactly what you want to do.
0
 

Author Comment

by:hrasheed
ID: 7141553
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
Highfive Gives IT Their Time Back

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!

 
LVL 30

Expert Comment

by:Axter
ID: 7160803
>>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
 
LVL 11

Expert Comment

by:griessh
ID: 7375944
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
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7419773
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Highfive Gives IT Their Time Back

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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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 how to clear a vector as well as how to detect empty vectors in C++.

706 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

11 Experts available now in Live!

Get 1:1 Help Now