[WIN32SS][USER32] CloseWindow does minimize, doesn't close (#984)

In Windows, user32!CloseWindow minimizes the window. It doesn't close the window actually. This is not a joke. This bad function naming is responsible to MS.
This commit is contained in:
Katayama Hirofumi MZ 2018-10-27 20:21:55 +09:00 committed by GitHub
parent d5cced1d42
commit d0e5f4ac11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,9 +127,9 @@ ChildWindowFromPointEx(HWND hwndParent,
BOOL WINAPI
CloseWindow(HWND hWnd)
{
SendMessageA(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0);
PostMessageW(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
return HandleToUlong(hWnd);
return ValidateHwnd(hWndParent) != NULL;
}
FORCEINLINE