mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
[MSPAINT] Some bug fixes on loading/saving files (#5385)
- Display a correct error message on failing to save a file. - Don't confuse the main file info and the non-main file info. - Rename ShowFileLoadError as ShowError, and strengthen and move it to dialogs.cpp. - Add SetFileInfo and InitializeImage helper functions. - Add IDS_SAVEERROR resource string. - Modify SaveDIBToFile, SetBitmapAndInfo, and DoLoadImageFile functions. CORE-18867
This commit is contained in:
parent
17e9dcc922
commit
3e23cdf9ee
38 changed files with 150 additions and 109 deletions
|
@ -209,10 +209,8 @@ _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, INT nC
|
|||
}
|
||||
|
||||
// Initialize imageModel
|
||||
imageModel.Crop(registrySettings.BMPWidth, registrySettings.BMPHeight);
|
||||
if (__argc >= 2)
|
||||
DoLoadImageFile(mainWindow, __targv[1], TRUE);
|
||||
imageModel.ClearHistory();
|
||||
if (__argc < 2 || !DoLoadImageFile(mainWindow, __targv[1], TRUE))
|
||||
InitializeImage(NULL, NULL, FALSE);
|
||||
|
||||
// Make the window visible on the screen
|
||||
mainWindow.ShowWindow(registrySettings.WindowPlacement.showCmd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue