https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d0e5f4ac115a04432d4ded...
commit d0e5f4ac115a04432d4dedc6e2e46686eed3d825 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Sat Oct 27 20:21:55 2018 +0900 Commit: GitHub noreply@github.com CommitDate: Sat Oct 27 20:21:55 2018 +0900
[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. --- win32ss/user/user32/windows/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/user32/windows/window.c b/win32ss/user/user32/windows/window.c index 048673ff10..bb42e4de4a 100644 --- a/win32ss/user/user32/windows/window.c +++ b/win32ss/user/user32/windows/window.c @@ -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