From 2f8f9d20aa50b5ae0c65f42196d3c7f513a61fe6 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 6 Apr 2016 14:41:03 +0200 Subject: [PATCH] user32: Use GWLP_HWNDPARENT to find an owner in EndDialog. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/user32/dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c index 2bacf4da3a3..2804ed27d43 100644 --- a/dlls/user32/dialog.c +++ b/dlls/user32/dialog.c @@ -914,7 +914,7 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval ) dlgInfo->idResult = retval; dlgInfo->flags |= DF_END; - owner = GetWindow( hwnd, GW_OWNER ); + owner = (HWND)GetWindowLongPtrA( hwnd, GWLP_HWNDPARENT ); if (owner) EnableWindow( owner, TRUE );