Solved

Question on DIsplaying a File

Posted on 2002-07-09
6
194 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

919 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

14 Experts available now in Live!

Get 1:1 Help Now