diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index 5482ac690fe..0195b08d8d1 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -657,6 +657,11 @@ typedef struct _SBINFOEX typedef struct _WND { THRDESKHEAD head; +#if 0 + WW ww; +#else + /* These fields should be moved in the WW at some point. */ + /* Plese do not change them to keep the same layout with WW. */ DWORD state; DWORD state2; /* Extended style. */ @@ -666,6 +671,7 @@ typedef struct _WND /* Handle of the module that created the window. */ HINSTANCE hModule; DWORD fnid; +#endif struct _WND *spwndNext; struct _WND *spwndPrev; struct _WND *spwndParent; diff --git a/win32ss/user/user32/windows/class.c b/win32ss/user/user32/windows/class.c index c0ad6a65d33..f12788fd220 100644 --- a/win32ss/user/user32/windows/class.c +++ b/win32ss/user/user32/windows/class.c @@ -1116,6 +1116,15 @@ LONG_PTR IntGetWindowLong( HWND hwnd, INT offset, UINT size, BOOL unicode ) case GWL_EXSTYLE: retvalue = wndPtr->ExStyle; break; case GWLP_ID: retvalue = wndPtr->IDMenu; break; case GWLP_HINSTANCE: retvalue = (ULONG_PTR)wndPtr->hModule; break; +#if 0 + /* -1 is an undocumented case which returns WW* */ + /* source: http://www.geoffchappell.com/studies/windows/win32/user32/structs/wnd/index.htm*/ + case -1: retvalue = (ULONG_PTR)&wndPtr->ww; break; +#else + /* We don't have a WW but WND already contains the same fields in the right order, */ + /* so we can return a pointer to its first field */ + case -1: retvalue = (ULONG_PTR)&wndPtr->state; break; +#endif case GWLP_WNDPROC: { if (!TestWindowProcess(wndPtr))