I have already looked over these extensively and still cant figure it out.
I have got the write to file working with the following function:
but I cant seem to reverse this to read the file contents into the field.
int SaveBat (HWND hwndDlg)
// took me 3 hours to get this working!!
fptr = fopen("sample1.bat", "w");
GetDlgItemText(hwndDlg, IDEDIT1, mytexta, 1023);
I've tried the following, but it only shows the first line using fgets. Again I have tried examples of while statements to read all lines, but can't get them to work
If anyone can show me how to make this work, or show me how to make the WinAPI method work I would be most grateful.
int LoadBat (HWND hwndDlg)
fptrc = fopen("sample1.bat", "r");
fgets( mytextc, 1023, fptrc );
SetDlgItemText(hwndDlg, IDEDIT1, mytextc);
fclose( fptrc );