FILE *fp; CString str; fp = fopen("C:\\vyasa.txt","rb+"); fread(str,24,1,fp); m_edit.SetWindowText(str); fclose(fp); Where m_edit is the member variable of the edit control.