Commit 4189a89d authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

user32: Show the GCL{,P}_* constant names in debug messages.

parent f46da1f9
......@@ -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:
......
......@@ -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 */
......@@ -2026,6 +2044,23 @@ static const USER_MSG *SPY_Bsearch_Msg( const USER_MSG *first, const USER_MSG *l
}
/***********************************************************************
* 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
*
* Sets the value of "wnd_class" member of the instance structure.
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment