mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SHIMGVW] Destroy window to exit app in Preview_Edit
CORE-19358
This commit is contained in:
parent
2de6e7559e
commit
a837138dfc
1 changed files with 11 additions and 0 deletions
|
@ -905,6 +905,14 @@ Preview_Edit(HWND hwnd)
|
|||
if (!g_pCurrentFile)
|
||||
return;
|
||||
|
||||
/* Avoid file locking */
|
||||
/* FIXME: Our GdipLoadImageFromFile locks the image file */
|
||||
if (g_pImage)
|
||||
{
|
||||
GdipDisposeImage(g_pImage);
|
||||
g_pImage = NULL;
|
||||
}
|
||||
|
||||
GetFullPathNameW(g_pCurrentFile->FileName, _countof(szPathName), szPathName, NULL);
|
||||
szPathName[_countof(szPathName) - 1] = UNICODE_NULL; /* Avoid buffer overrun */
|
||||
|
||||
|
@ -917,6 +925,9 @@ Preview_Edit(HWND hwnd)
|
|||
{
|
||||
DPRINT1("Preview_Edit: ShellExecuteExW() failed with code %ld\n", GetLastError());
|
||||
}
|
||||
|
||||
// Destroy the window to quit the application
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
static VOID
|
||||
|
|
Loading…
Reference in a new issue