============================================================================= FileIO()
| 5386 | // |
| 5387 | // |
| 5388 | BOOL FileIO ( BOOL fLoad, LPCWSTR psz, BOOL bNoEncDetect, int *ienc, int *ieol, |
| 5389 | BOOL *pbUnicodeErr, BOOL *pbFileTooBig, |
| 5390 | BOOL *pbCancelDataLoss, BOOL bSaveCopy ) |
| 5391 | { |
| 5392 | WCHAR tch[MAX_PATH + 40]; |
| 5393 | BOOL fSuccess; |
| 5394 | DWORD dwFileAttributes; |
| 5395 | BeginWaitCursor(); |
| 5396 | FormatString ( tch, COUNTOF ( tch ), ( fLoad ) ? IDS_LOADFILE : IDS_SAVEFILE, PathFindFileName ( psz ) ); |
| 5397 | StatusSetText ( hwndStatus, STATUS_HELP, tch ); |
| 5398 | StatusSetSimple ( hwndStatus, TRUE ); |
| 5399 | InvalidateRect ( hwndStatus, NULL, TRUE ); |
| 5400 | UpdateWindow ( hwndStatus ); |
| 5401 | if ( fLoad ) { |
| 5402 | fSuccess = EditLoadFile ( hwndEdit, psz, bNoEncDetect, ienc, ieol, pbUnicodeErr, pbFileTooBig ); |
| 5403 | } else { |
| 5404 | fSuccess = EditSaveFile ( hwndEdit, psz, *ienc, pbCancelDataLoss, bSaveCopy ); |
| 5405 | } |
| 5406 | dwFileAttributes = GetFileAttributes ( psz ); |
| 5407 | bReadOnly = ( dwFileAttributes != INVALID_FILE_ATTRIBUTES && dwFileAttributes & FILE_ATTRIBUTE_READONLY ); |
| 5408 | StatusSetSimple ( hwndStatus, FALSE ); |
| 5409 | EndWaitCursor(); |
| 5410 | return ( fSuccess ); |
| 5411 | } |
| 5412 | //============================================================================= |
| 5413 | // |
| 5414 | // FileLoad() |
no test coverage detected