I got this code
But it only shows the last line of the file loaded.Is there a way to solve this?Code:string line; ifstream fin; ofstream ofin; do { if (fin.is_open()) { fin.close(); } fin.open(FilePath); if (!fin) { MessageBox(NULL,"Unable to open, file might be missing.","Error",MB_ICONERROR | MB_OK); } } while (!fin); if (fin.is_open()) { while (! fin.eof() ) { getline (fin,line); if (fin.eof()) { SendMessage(hTextbox, WM_SETTEXT, 0,(LPARAM)(LPSTR)line.c_str()); } } if (fin.eof()) { SendMessage(hProgress,PBM_SETPOS,100,0); } }



LinkBack URL
About LinkBacks


