title: CFile reads 0 bytes
body: <p>When using a CFile, for Some reason my call to read() returns 0 bytes after the first call</p>
  
  <pre><code>CFile iniFile;
  int bytesRead=0;
  char buffer[_MAX_PATH]; 
  if(iniFile.Open(iniDirFilename,CFile::modeRead)){
          bytesRead += iniFile.Read(buffer,_MAX_PATH); // read file path
          SaveDirectoryBox-&gt;SetWindowTextA(buffer);
          iniFile.Seek(bytesRead,CFile::begin); // reposition pointer
  
          int x =iniFile.GetLength();
          int y =iniFile.GetPosition();
  
  
  
  
          bytesRead += iniFile.Read(buffer,_MAX_PATH); // read subfile path
          subSaveDirectoryBox-&gt;SetWindowTextA(buffer);
          iniFile.Seek(bytesRead,CFile::begin); // reposition pointer
  }
  </code></pre>
  
  <p>It shows me that the file length is only 72 bytes when I know it is clearly more.
  I saved a bunch of null terminated strings. For example
         "Hello"
   I suspect that upon construction the CFile class looks for the first NULL character and calls it the end of file. I tried using the setLength() function but that gives me an error</p>
  
  <p>How can I read the rest of the file?</p>
  
  <h2>edit:</h2>
  
  <p>I should mention that I have my project set to read an write in ascii. And the file is written in ascii too</p>