Module: wine Branch: master Commit: 6c1cdc71869ba175e30730ebbc6a86cef5ff89d7 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c1cdc71869ba175e30730ebbc...
Author: Lei Zhang thestig@google.com Date: Thu Jan 24 14:18:36 2008 -0800
user32: Use wine_dbgstr_rect() in traces.
---
dlls/user32/combo.c | 9 +++------ dlls/user32/defwnd.c | 4 ++-- dlls/user32/listbox.c | 8 ++++---- dlls/user32/nonclient.c | 10 +++------- dlls/user32/painting.c | 5 ++--- dlls/user32/spy.c | 16 ++++++---------- dlls/user32/uitools.c | 3 +-- dlls/user32/winpos.c | 3 +-- 8 files changed, 22 insertions(+), 36 deletions(-)
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c index c39d08b..cd78891 100644 --- a/dlls/user32/combo.c +++ b/dlls/user32/combo.c @@ -435,14 +435,11 @@ static void CBCalcPlacement( if (lprEdit->right < lprEdit->left) lprEdit->right = lprEdit->left;
- TRACE("\ttext\t= (%d,%d-%d,%d)\n", - lprEdit->left, lprEdit->top, lprEdit->right, lprEdit->bottom); + TRACE("\ttext\t= (%s)\n", wine_dbgstr_rect(lprEdit));
- TRACE("\tbutton\t= (%d,%d-%d,%d)\n", - lprButton->left, lprButton->top, lprButton->right, lprButton->bottom); + TRACE("\tbutton\t= (%s)\n", wine_dbgstr_rect(lprButton));
- TRACE("\tlbox\t= (%d,%d-%d,%d)\n", - lprLB->left, lprLB->top, lprLB->right, lprLB->bottom ); + TRACE("\tlbox\t= (%s)\n", wine_dbgstr_rect(lprLB)); }
/*********************************************************************** diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 2bde5ad..53caf12 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -421,8 +421,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa GetClientRect( hwnd, &rc ); x = (rc.right - rc.left - GetSystemMetrics(SM_CXICON))/2; y = (rc.bottom - rc.top - GetSystemMetrics(SM_CYICON))/2; - TRACE("Painting class icon: vis rect=(%d,%d - %d,%d)\n", - ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom ); + TRACE("Painting class icon: vis rect=(%s)\n", + wine_dbgstr_rect(&ps.rcPaint)); DrawIcon( hdc, x, y, hIcon ); } EndPaint( hwnd, &ps ); diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index d819684..7232644 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -581,9 +581,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect, if (!IsWindowEnabled(descr->self)) dis.itemState |= ODS_DISABLED; dis.itemData = item->data; dis.rcItem = *rect; - TRACE("[%p]: drawitem %d (%s) action=%02x state=%02x rect=%d,%d-%d,%d\n", + TRACE("[%p]: drawitem %d (%s) action=%02x state=%02x rect=%s\n", descr->self, index, item ? debugstr_w(item->str) : "", action, - dis.itemState, rect->left, rect->top, rect->right, rect->bottom ); + dis.itemState, wine_dbgstr_rect(rect) ); SendMessageW(descr->owner, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis); } else @@ -601,9 +601,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect, oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); }
- TRACE("[%p]: painting %d (%s) action=%02x rect=%d,%d-%d,%d\n", + TRACE("[%p]: painting %d (%s) action=%02x rect=%s\n", descr->self, index, item ? debugstr_w(item->str) : "", action, - rect->left, rect->top, rect->right, rect->bottom ); + wine_dbgstr_rect(rect) ); if (!item) ExtTextOutW( hdc, rect->left + 1, rect->top, ETO_OPAQUE | ETO_CLIPPED, rect, NULL, 0, NULL ); diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 58671c5..503f7c1 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -396,9 +396,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME;
- TRACE("(%d,%d)-(%d,%d) %08x %d %08x\n", - rect->left, rect->top, rect->right, rect->bottom, - style, menu, exStyle ); + TRACE("(%s) %08x %d %08x\n", wine_dbgstr_rect(rect), style, menu, exStyle );
NC_AdjustRectOuter( rect, style, menu, exStyle ); NC_AdjustRectInner( rect, style, exStyle ); @@ -1065,14 +1063,12 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) RECT r = rect; r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
- TRACE("Calling DrawMenuBar with rect (%d, %d)-(%d, %d)\n", - r.left, r.top, r.right, r.bottom); + TRACE("Calling DrawMenuBar with rect (%s)\n", wine_dbgstr_rect(&r));
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; }
- TRACE("After MenuBar, rect is (%d, %d)-(%d, %d).\n", - rect.left, rect.top, rect.right, rect.bottom ); + TRACE("After MenuBar, rect is (%s).\n", wine_dbgstr_rect(&rect));
if (dwExStyle & WS_EX_CLIENTEDGE) DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c index 9ba4a7a..93fe97c 100644 --- a/dlls/user32/painting.c +++ b/dlls/user32/painting.c @@ -444,9 +444,8 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
lps->fErase = send_erase( hwnd, flags, hrgn, &lps->rcPaint, &lps->hdc );
- TRACE("hdc = %p box = (%d,%d - %d,%d), fErase = %d\n", - lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom, - lps->fErase); + TRACE("hdc = %p box = (%s), fErase = %d\n", + lps->hdc, wine_dbgstr_rect(&lps->rcPaint), lps->fErase);
return lps->hdc; } diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c index 22a4d5c..b0a93ba 100644 --- a/dlls/user32/spy.c +++ b/dlls/user32/spy.c @@ -2321,10 +2321,8 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) case LVM_GETSUBITEMRECT: { LPRECT rc = (LPRECT) sp_e->lParam; - if (rc) { - TRACE("lParam rect (%d,%d)-(%d,%d)\n", - rc->left, rc->top, rc->right, rc->bottom); - } + if (rc) + TRACE("lParam rect (%s)\n", wine_dbgstr_rect(rc)); break; } case LVM_SETITEMPOSITION32: @@ -2404,10 +2402,9 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) lpdis->CtlType, lpdis->CtlID); TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", lpdis->itemID, lpdis->itemAction, lpdis->itemState); - TRACE("hWnd=%p hDC=%p (%d,%d)-(%d,%d) itemData=0x%08lx\n", - lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left, - lpdis->rcItem.top, lpdis->rcItem.right, - lpdis->rcItem.bottom, lpdis->itemData); + TRACE("hWnd=%p hDC=%p (%s) itemData=0x%08lx\n", + lpdis->hwndItem, lpdis->hDC, + wine_dbgstr_rect(&lpdis->rcItem), lpdis->itemData); } break; case WM_MEASUREITEM: @@ -2463,8 +2460,7 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) case WM_NCCALCSIZE: { RECT *rc = (RECT *)sp_e->lParam; - TRACE("Rect (%d,%d)-(%d,%d)\n", - rc->left, rc->top, rc->right, rc->bottom); + TRACE("Rect (%s)\n", wine_dbgstr_rect(rc)); } break; case WM_NOTIFY: diff --git a/dlls/user32/uitools.c b/dlls/user32/uitools.c index b2e1239..9e2c106 100644 --- a/dlls/user32/uitools.c +++ b/dlls/user32/uitools.c @@ -576,8 +576,7 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc, */ BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags ) { - TRACE("%p %d,%d-%d,%d %04x %04x\n", - hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags ); + TRACE("%p %s %04x %04x\n", hdc, wine_dbgstr_rect(rc), edge, flags );
if(flags & BF_DIAGONAL) return UITOOLS95_DrawDiagEdge(hdc, rc, edge, flags); diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 1eb15d6..40ff927 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -170,8 +170,7 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect ) if (ret) { MapWindowPoints( GetAncestor( hwnd, GA_PARENT ), 0, (POINT *)rect, 2 ); - TRACE( "hwnd %p (%d,%d)-(%d,%d)\n", - hwnd, rect->left, rect->top, rect->right, rect->bottom); + TRACE( "hwnd %p (%s)\n", hwnd, wine_dbgstr_rect(rect) ); } return ret; }