[MSPAINT] Refactor loading/saving image file (#2686)

- Add DoLoadImageFile, CreateWhiteDIB, and CMainWindow::ConfirmSave functions.
- Replace LoadDIBFromFile function with DoLoadImageFile.
- Fix the empty file loading.
- Delete UpdateApplicationProperties function.
- Rewrite SaveDIBToFile function.
CORE-16982, CORE-16979
This commit is contained in:
Katayama Hirofumi MZ 2020-04-29 07:44:18 +09:00 committed by GitHub
parent 125020c23f
commit 036206a1c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 186 additions and 225 deletions

View file

@ -161,8 +161,7 @@ void ImageModel::Crop(int nWidth, int nHeight, int nOffsetX, int nOffsetY)
void ImageModel::SaveImage(LPTSTR lpFileName)
{
SaveDIBToFile(hBms[currInd], lpFileName, hDrawingDC, &fileTime, &fileSize, fileHPPM, fileVPPM);
imageSaved = TRUE;
SaveDIBToFile(hBms[currInd], lpFileName, hDrawingDC);
}
BOOL ImageModel::IsImageSaved()