[MSPAINT] Follow-up of #2686

Show error message if SaveDIBToFile failed.
CORE-16982, CORE-16979
This commit is contained in:
Katayama Hirofumi MZ 2020-04-29 08:39:47 +09:00
parent f3235f1074
commit 7fe7f5e4c1

View file

@ -75,7 +75,10 @@ BOOL SaveDIBToFile(HBITMAP hBitmap, LPTSTR FileName, HDC hDC)
WIN32_FIND_DATA find;
HANDLE hFind = FindFirstFile(FileName, &find);
if (hFind == INVALID_HANDLE_VALUE)
{
ShowFileLoadError(FileName);
return FALSE;
}
FindClose(hFind);
// update time and size
@ -114,6 +117,7 @@ HBITMAP SetBitmapAndInfo(HBITMAP hBitmap, LPCTSTR name, DWORD dwFileSize, BOOL i
fileHPPM = fileVPPM = 2834;
ZeroMemory(&fileTime, sizeof(fileTime));
isFile = FALSE;
}
else
{