From 936c6c4ea49839af095ce679d948d9853775ce74 Mon Sep 17 00:00:00 2001 From: "Guy L. Albertelli" Date: Sun, 22 Oct 2000 23:52:47 +0000 Subject: [PATCH] Added wParam and lParam as parameters in SPY_ExitMessage Added dump for the STYLECHANG[ING|ED] messages. Dump structures on exit only if message allows changes. --- include/spy.h | 2 +- windows/defwnd.c | 6 +++--- windows/message.c | 13 ++++++++----- windows/spy.c | 18 +++++++++++++++--- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/include/spy.h b/include/spy.h index 6c71abd33e6..a2e98f4cdb1 100644 --- a/include/spy.h +++ b/include/spy.h @@ -26,7 +26,7 @@ extern const char *SPY_GetMsgName( UINT msg ); extern void SPY_EnterMessage( INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); extern void SPY_ExitMessage( INT iFlag, HWND hwnd, UINT msg, - LRESULT lReturn ); + LRESULT lReturn, WPARAM wParam, LPARAM lParam ); extern int SPY_Init(void); #endif /* __WINE_SPY_H */ diff --git a/windows/defwnd.c b/windows/defwnd.c index bb3d7c82744..1e53645a135 100644 --- a/windows/defwnd.c +++ b/windows/defwnd.c @@ -618,7 +618,7 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam, } WIN_ReleaseWndPtr(wndPtr); - SPY_ExitMessage( SPY_RESULT_DEFWND16, hwnd, msg, result ); + SPY_ExitMessage( SPY_RESULT_DEFWND16, hwnd, msg, result, wParam, lParam ); return result; } @@ -682,7 +682,7 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, } WIN_ReleaseWndPtr(wndPtr); - SPY_ExitMessage( SPY_RESULT_DEFWND, hwnd, msg, result ); + SPY_ExitMessage( SPY_RESULT_DEFWND, hwnd, msg, result, wParam, lParam ); return result; } @@ -737,6 +737,6 @@ LRESULT WINAPI DefWindowProcW( break; } WIN_ReleaseWndPtr(wndPtr); - SPY_ExitMessage( SPY_RESULT_DEFWND, hwnd, msg, result ); + SPY_ExitMessage( SPY_RESULT_DEFWND, hwnd, msg, result, wParam, lParam ); return result; } diff --git a/windows/message.c b/windows/message.c index 880c860806e..9af4be63ce1 100644 --- a/windows/message.c +++ b/windows/message.c @@ -1803,9 +1803,9 @@ static LRESULT MSG_SendMessage( HWND hwnd, UINT msg, WPARAM wParam, } if (flags & SMSG_WIN32) - SPY_ExitMessage( SPY_RESULT_OK, hwnd, msg, *pRes ); + SPY_ExitMessage( SPY_RESULT_OK, hwnd, msg, *pRes, wParam, lParam ); else - SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, *pRes ); + SPY_ExitMessage( SPY_RESULT_OK16, hwnd, msg, *pRes, wParam, lParam ); END: WIN_ReleaseWndPtr(wndPtr); return ret; @@ -2309,7 +2309,8 @@ LONG WINAPI DispatchMessage16( const MSG16* msg ) retval = CallWindowProc16( (WNDPROC16)wndPtr->winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK16, msg->hwnd, msg->message, retval ); + SPY_ExitMessage( SPY_RESULT_OK16, msg->hwnd, msg->message, retval, + msg->wParam, msg->lParam ); WIN_ReleaseWndPtr(wndPtr); wndPtr = WIN_FindWndPtr(msg->hwnd); @@ -2393,7 +2394,8 @@ LONG WINAPI DispatchMessageA( const MSG* msg ) retval = CallWindowProcA( (WNDPROC)wndPtr->winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval ); + SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval, + msg->wParam, msg->lParam ); WIN_ReleaseWndPtr(wndPtr); wndPtr = WIN_FindWndPtr(msg->hwnd); @@ -2475,7 +2477,8 @@ LONG WINAPI DispatchMessageW( const MSG* msg ) retval = CallWindowProcW( (WNDPROC)wndPtr->winproc, msg->hwnd, msg->message, msg->wParam, msg->lParam ); - SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval ); + SPY_ExitMessage( SPY_RESULT_OK, msg->hwnd, msg->message, retval, + msg->wParam, msg->lParam ); WIN_ReleaseWndPtr(wndPtr); wndPtr = WIN_FindWndPtr(msg->hwnd); diff --git a/windows/spy.c b/windows/spy.c index 475d0c823af..881a3288650 100644 --- a/windows/spy.c +++ b/windows/spy.c @@ -838,11 +838,12 @@ const char *SPY_GetWndName( HWND hwnd ) /*********************************************************************** * SPY_DumpStructure */ -void SPY_DumpStructure (UINT msg, LPARAM structure) +void SPY_DumpStructure (UINT msg, BOOL enter, LPARAM structure) { switch (msg) { case WM_DRAWITEM: + if (!enter) break; { DRAWITEMSTRUCT *lpdis = (DRAWITEMSTRUCT*) structure; TRACE("DRAWITEMSTRUCT: CtlType=0x%08x CtlID=0x%08x\n", lpdis->CtlType, lpdis->CtlID); TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", lpdis->itemID, lpdis->itemAction, lpdis->itemState); @@ -857,7 +858,16 @@ void SPY_DumpStructure (UINT msg, LPARAM structure) TRACE("itemData=0x%08lx\n", lpmis->itemData); } break; + case WM_STYLECHANGED: + if (!enter) break; + case WM_STYLECHANGING: + { LPSTYLESTRUCT ss = (LPSTYLESTRUCT) structure; + TRACE("STYLESTRUCT: StyleOld=0x%08lx, StyleNew=0x%08lx\n", + ss->styleOld, ss->styleNew); + } + break; case WM_NOTIFY: + if (!enter) break; { NMHDR * pnmh = (NMHDR*) structure; TRACE("NMHDR hwndFrom=0x%08x idFrom=0x%08x code=0x%08x\n", pnmh->hwndFrom, pnmh->idFrom, pnmh->code); } @@ -916,7 +926,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, { TRACE("%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n", SPY_IndentLevel, "", hWnd, pname, msg, SPY_GetMsgName( msg ), taskName, wParam, lParam ); - SPY_DumpStructure(msg, lParam); + SPY_DumpStructure(msg, TRUE, lParam); } } break; @@ -942,7 +952,8 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg, /*********************************************************************** * SPY_ExitMessage */ -void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn ) +void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn, + WPARAM wParam, LPARAM lParam ) { LPCSTR pname; @@ -976,6 +987,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn ) TRACE(" %*s(%08x) %-16s message [%04x] %s returned %08lx\n", SPY_IndentLevel, "", hWnd, pname, msg, SPY_GetMsgName( msg ), lReturn ); + SPY_DumpStructure(msg, FALSE, lParam); break; case SPY_RESULT_INVALIDHWND16: -- 2.11.4.GIT