Need to show whole text file in a edit box.
Posted on 1998-08-02
I have code below which loads a text file into an edit box on a dialog window. Only it only show the first 100 or so characters. I have scroll boxes etx, but how can I get it to show the whole text file in any length. That way I can scroll down the text file in the edit box in the dialog window. Am I using the wrong kind of variable. It's set as a value and then CString. I use ClassWizrad.
Please speak in laymens terms, I'm a newbie and will get lost easy if you use crazy words.
Here's my code.
// TODO: Add your control notification handler code
//Will Load the Numbers.TXT File
if ( f.Open("E:\\Numbers.txt", CFile::modeRead)== FALSE )
//Creare an archive odject
CArchive ar( &f, CArchive::load );
//Serialzie data from the archive into m_NumbersEdit
ar >> m_NumbersEdit;
//Close the archive
//Close the file.
//Update screen with the Numbers information