[SHIMGVW] Add file extension on file save (#5975)

In order to add a filename extension if necessary,
set "png" to OPENFILENAME.lpstrDefExt.
CORE-19222
This commit is contained in:
Katayama Hirofumi MZ 2023-11-14 19:48:18 +09:00 committed by GitHub
parent 3fb5957de1
commit 91adec683d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -435,8 +435,9 @@ static void pSaveImageAs(HWND hwnd)
sfn.hInstance = hInstance;
sfn.lpstrFile = szSaveFileName;
sfn.lpstrFilter = szFilterMask;
sfn.nMaxFile = MAX_PATH;
sfn.nMaxFile = _countof(szSaveFileName);
sfn.Flags = OFN_EXPLORER | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY;
sfn.lpstrDefExt = L"png";
c = szFilterMask;