|
-
March 28th, 1999, 11:08 PM
#1
How to read file in VC++6.0
Hello:
I have a question.
There is a data file include math and word.I want
use VC++6.0 read it.I known VC++6.0 auto made.Serialize()
can read the filein doc class.And then how to do.And if
i can use it in view class?
Thank you very much!
-
March 20th, 2001, 03:13 AM
#2
Re: How to read file in VC++6.0
Hi,
I didn't understand what u want to read. Whether u want to read a file from hard disk or asking about the doc/view architecture.....anyway..
If u want to read a file from the hard disk, u will have to use the CFile or CStdioFile class of MFC. Create it like this
CStdioFile *pFile = new CFile(<filename>. CStdioFile::modeCreate| CFile::modeReadWrite);
pFile->ReadString(<buffer> ;
If u want data from the doc class in the view class use the GetDocument member function of CView class, this returns a pointer of the CDocument class that ur wizard created.
regards,
Murali.B
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|