//... CFile file(lpszPathName, CFile::modeRead); CArchive arc(&file, CArchive::load); //... CString str; arc.ReadString(str); //...