Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Box 1

Status
Not open for further replies.

jimjake

Technical User
Oct 30, 2004
25
US
CFile fileEditText;
if(fileEditText.Open("c:\\My Documents\\jiminsurance.txt", CFile::modeRead));
{
char cBuf[512];
UINT uBytesRead;

while(uBytesRead =
fileEditText.Read(cBuf,sizeof(cBuf)-1))
{
cBuf[uBytesRead] = NULL;
m_EditBox += CString(cBuf);
}
fileEditText.Close();
UpdateData(FALSE);
}
The above code works for reading a whole file into an EDIT BOX,
Could someone give me a hint on how to read just the first 15 bytes the file
Thank you …… Jim
 
Hint: the Read method has a parameter which specifies how many bytes to read.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top