By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,159 Members | 888 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,159 IT Pros & Developers. It's quick & easy.

C++ Builder Opening/Reading and Displaying Files

P: 2
I am stuck on a problem that I am certain someone has already done. I use, in Borland C++ Builder 3 (kind of old):

TOpenDialog* dlg=new TOpenDialog(this);
dlg->Title="Open a New File";
dlg->Execute();

It opens the dialog box and I select a sample .txt file or .doc file to open. Then it's the problem. I have tried several examples and cannot seem to display its contents in either a memo field box or grid box. Anyone know how I can write the code to display the selected file?

I would like to keep the top part as it is, without having to change that part, which works.
Feb 21 '07 #1
Share this Question
Share on Google+
3 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
I am stuck on a problem that I am certain someone has already done. I use, in Borland C++ Builder 3 (kind of old):

TOpenDialog* dlg=new TOpenDialog(this);
dlg->Title="Open a New File";
dlg->Execute();

It opens the dialog box and I select a sample .txt file or .doc file to open. Then it's the problem. I have tried several examples and cannot seem to display its contents in either a memo field box or grid box. Anyone know how I can write the code to display the selected file?

I would like to keep the top part as it is, without having to change that part, which works.
Are you trying to display (just display) the contents, or are you trying to edit them as well?
Feb 21 '07 #2

P: 2
Are you trying to display (just display) the contents, or are you trying to edit them as well?
I am trying just to display them. Thanks for replying.
Feb 22 '07 #3

P: 1
hi i am trying to do the same but i want to edit the files as will

if you can answer us poth

many thanks
Nov 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.