Is there anyone that could tell me why a code like this:
---------------------------------------------
CFileDialog dlg(TRUE);
FILE* fp;
char buff[512000];
if(IDOK==dlg.DoModal())
{
fp=fopen((LPCTSTR)dlg.GetPathName(),"rb"
int ch;
int i=0;
while((!feof(fp)) && (i<511999))
{
//fread(buff,sizeof(char),1024,fp);
ch=fgetc(fp);
if(ch!=EOF)buff[i++]=char(ch);
else MessageBox("EOF"
}
fclose(fp);
}
m_r.SetWindowText(LPCTSTR(buff));//m_r is a richedit control
-----------------------------------------------------------
doesn't display me anything but only the first 5 characters
from a .BMP file ??????????????
---------------------------------------------
CFileDialog dlg(TRUE);
FILE* fp;
char buff[512000];
if(IDOK==dlg.DoModal())
{
fp=fopen((LPCTSTR)dlg.GetPathName(),"rb"
int ch;
int i=0;
while((!feof(fp)) && (i<511999))
{
//fread(buff,sizeof(char),1024,fp);
ch=fgetc(fp);
if(ch!=EOF)buff[i++]=char(ch);
else MessageBox("EOF"
}
fclose(fp);
}
m_r.SetWindowText(LPCTSTR(buff));//m_r is a richedit control
-----------------------------------------------------------
doesn't display me anything but only the first 5 characters
from a .BMP file ??????????????