diff --git a/dlls/user32/class.c b/dlls/user32/class.c index 61edcc6ecf2..9817735aa25 100644 --- a/dlls/user32/class.c +++ b/dlls/user32/class.c @@ -673,7 +673,8 @@ static ULONG_PTR CLASS_GetClassLong( HWND hwnd, INT offset, UINT size, case GCLP_HICONSM: case GCLP_WNDPROC: case GCLP_MENUNAME: - FIXME( "offset %d not supported on other process window %p\n", offset, hwnd ); + FIXME( "offset %d (%s) not supported on other process window %p\n", + offset, SPY_GetClassLongOffsetName(offset), hwnd ); SetLastError( ERROR_INVALID_HANDLE ); break; case GCL_STYLE: diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index 451b0b25979..164101ef328 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -44,6 +44,24 @@ WINE_DEFAULT_DEBUG_CHANNEL(message); #define DEBUG_SPY 0 +static const char * const ClassLongOffsetNames[] = +{ + "GCLP_MENUNAME", /* -8 */ + "GCLP_HBRBACKGROUND", /* -10 */ + "GCLP_HCURSOR", /* -12 */ + "GCLP_HICON", /* -14 */ + "GCLP_HMODULE", /* -16 */ + "GCL_CBWNDEXTRA", /* -18 */ + "GCL_CBCLSEXTRA", /* -20 */ + "?", + "GCLP_WNDPROC", /* -24 */ + "GCL_STYLE", /* -26 */ + "?", + "?", + "GCW_ATOM", /* -32 */ + "GCLP_HICONSM", /* -34 */ +}; + static const char * const MessageTypeNames[SPY_MAX_MSGNUM + 1] = { "WM_NULL", /* 0x00 */ @@ -2025,6 +2043,23 @@ static const USER_MSG *SPY_Bsearch_Msg( const USER_MSG *first, const USER_MSG *l return NULL; } +/*********************************************************************** + * SPY_GetClassLongOffsetName + * + * Gets the name of a class long offset. + */ +const char *SPY_GetClassLongOffsetName( INT offset ) +{ + INT index; + if (offset < 0 && offset % 2 == 0 && ((index = -(offset + 8) / 2) < + sizeof(ClassLongOffsetNames) / sizeof(*ClassLongOffsetNames))) + { + return ClassLongOffsetNames[index]; + } + + return "?"; +} + /*********************************************************************** * SPY_GetClassName * diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index ae27884db84..f939e4e59e8 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -239,6 +239,7 @@ extern BOOL USER_SetWindowPos( WINDOWPOS * winpos ); #define SPY_RESULT_DEFWND16 0x0004 #define SPY_RESULT_DEFWND 0x0005 +extern const char *SPY_GetClassLongOffsetName( INT offset ); extern const char *SPY_GetMsgName( UINT msg, HWND hWnd ); extern const char *SPY_GetVKeyName(WPARAM wParam); extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );