From 512b0582c68aee458ceec6130230c288b33e7106 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Wed, 12 Dec 2007 06:12:02 +0000 Subject: [PATCH] Temporarily implement GWL_HWNDPARENT in user mode. svn path=/trunk/; revision=31175 --- reactos/dll/win32/user32/windows/class.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/reactos/dll/win32/user32/windows/class.c b/reactos/dll/win32/user32/windows/class.c index e59f02aef04..4485f387a2f 100644 --- a/reactos/dll/win32/user32/windows/class.c +++ b/reactos/dll/win32/user32/windows/class.c @@ -529,6 +529,11 @@ GetWindowLongA ( HWND hWnd, int nIndex ) case GWL_HWNDPARENT: DbgPrint("GWL_HWNDPARENT\n"); /* FIXME: Implement in user32 */ + { + HWND parent = GetAncestor( hWnd, GA_PARENT ); + if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER ); + return (LONG)parent; + } case GWL_WNDPROC: /* Call win32k for this as a callproc handle may need to be created */ @@ -583,6 +588,11 @@ GetWindowLongW(HWND hWnd, int nIndex) case GWL_HWNDPARENT: DbgPrint("GWL_HWNDPARENT\n"); /* FIXME: Implement in user32 */ + { + HWND parent = GetAncestor( hWnd, GA_PARENT ); + if (parent == GetDesktopWindow()) parent = GetWindow( hWnd, GW_OWNER ); + return (LONG)parent; + } case GWL_WNDPROC: /* Call win32k for this as a callproc handle may need to be created */