Commit 6c1cdc71 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

user32: Use wine_dbgstr_rect() in traces.

parent 39804012
...@@ -435,14 +435,11 @@ static void CBCalcPlacement( ...@@ -435,14 +435,11 @@ static void CBCalcPlacement(
if (lprEdit->right < lprEdit->left) if (lprEdit->right < lprEdit->left)
lprEdit->right = lprEdit->left; lprEdit->right = lprEdit->left;
TRACE("\ttext\t= (%d,%d-%d,%d)\n", TRACE("\ttext\t= (%s)\n", wine_dbgstr_rect(lprEdit));
lprEdit->left, lprEdit->top, lprEdit->right, lprEdit->bottom);
TRACE("\tbutton\t= (%d,%d-%d,%d)\n", TRACE("\tbutton\t= (%s)\n", wine_dbgstr_rect(lprButton));
lprButton->left, lprButton->top, lprButton->right, lprButton->bottom);
TRACE("\tlbox\t= (%d,%d-%d,%d)\n", TRACE("\tlbox\t= (%s)\n", wine_dbgstr_rect(lprLB));
lprLB->left, lprLB->top, lprLB->right, lprLB->bottom );
} }
/*********************************************************************** /***********************************************************************
......
...@@ -421,8 +421,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa ...@@ -421,8 +421,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
GetClientRect( hwnd, &rc ); GetClientRect( hwnd, &rc );
x = (rc.right - rc.left - GetSystemMetrics(SM_CXICON))/2; x = (rc.right - rc.left - GetSystemMetrics(SM_CXICON))/2;
y = (rc.bottom - rc.top - GetSystemMetrics(SM_CYICON))/2; y = (rc.bottom - rc.top - GetSystemMetrics(SM_CYICON))/2;
TRACE("Painting class icon: vis rect=(%d,%d - %d,%d)\n", TRACE("Painting class icon: vis rect=(%s)\n",
ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom ); wine_dbgstr_rect(&ps.rcPaint));
DrawIcon( hdc, x, y, hIcon ); DrawIcon( hdc, x, y, hIcon );
} }
EndPaint( hwnd, &ps ); EndPaint( hwnd, &ps );
......
...@@ -581,9 +581,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect, ...@@ -581,9 +581,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
if (!IsWindowEnabled(descr->self)) dis.itemState |= ODS_DISABLED; if (!IsWindowEnabled(descr->self)) dis.itemState |= ODS_DISABLED;
dis.itemData = item->data; dis.itemData = item->data;
dis.rcItem = *rect; 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, 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); SendMessageW(descr->owner, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
} }
else else
...@@ -601,9 +601,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect, ...@@ -601,9 +601,9 @@ static void LISTBOX_PaintItem( LB_DESCR *descr, HDC hdc, const RECT *rect,
oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT)); 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, descr->self, index, item ? debugstr_w(item->str) : "", action,
rect->left, rect->top, rect->right, rect->bottom ); wine_dbgstr_rect(rect) );
if (!item) if (!item)
ExtTextOutW( hdc, rect->left + 1, rect->top, ExtTextOutW( hdc, rect->left + 1, rect->top,
ETO_OPAQUE | ETO_CLIPPED, rect, NULL, 0, NULL ); ETO_OPAQUE | ETO_CLIPPED, rect, NULL, 0, NULL );
......
...@@ -396,9 +396,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty ...@@ -396,9 +396,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty
WS_EX_STATICEDGE | WS_EX_TOOLWINDOW); WS_EX_STATICEDGE | WS_EX_TOOLWINDOW);
if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME; if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME;
TRACE("(%d,%d)-(%d,%d) %08x %d %08x\n", TRACE("(%s) %08x %d %08x\n", wine_dbgstr_rect(rect), style, menu, exStyle );
rect->left, rect->top, rect->right, rect->bottom,
style, menu, exStyle );
NC_AdjustRectOuter( rect, style, menu, exStyle ); NC_AdjustRectOuter( rect, style, menu, exStyle );
NC_AdjustRectInner( rect, style, exStyle ); NC_AdjustRectInner( rect, style, exStyle );
...@@ -1065,14 +1063,12 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint ) ...@@ -1065,14 +1063,12 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint )
RECT r = rect; RECT r = rect;
r.bottom = rect.top + GetSystemMetrics(SM_CYMENU); r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
TRACE("Calling DrawMenuBar with rect (%d, %d)-(%d, %d)\n", TRACE("Calling DrawMenuBar with rect (%s)\n", wine_dbgstr_rect(&r));
r.left, r.top, r.right, r.bottom);
rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1; rect.top += MENU_DrawMenuBar( hdc, &r, hwnd, suppress_menupaint ) + 1;
} }
TRACE("After MenuBar, rect is (%d, %d)-(%d, %d).\n", TRACE("After MenuBar, rect is (%s).\n", wine_dbgstr_rect(&rect));
rect.left, rect.top, rect.right, rect.bottom );
if (dwExStyle & WS_EX_CLIENTEDGE) if (dwExStyle & WS_EX_CLIENTEDGE)
DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST); DrawEdge (hdc, &rect, EDGE_SUNKEN, BF_RECT | BF_ADJUST);
......
...@@ -444,9 +444,8 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps ) ...@@ -444,9 +444,8 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
lps->fErase = send_erase( hwnd, flags, hrgn, &lps->rcPaint, &lps->hdc ); lps->fErase = send_erase( hwnd, flags, hrgn, &lps->rcPaint, &lps->hdc );
TRACE("hdc = %p box = (%d,%d - %d,%d), fErase = %d\n", TRACE("hdc = %p box = (%s), fErase = %d\n",
lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom, lps->hdc, wine_dbgstr_rect(&lps->rcPaint), lps->fErase);
lps->fErase);
return lps->hdc; return lps->hdc;
} }
......
...@@ -2321,10 +2321,8 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) ...@@ -2321,10 +2321,8 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
case LVM_GETSUBITEMRECT: case LVM_GETSUBITEMRECT:
{ {
LPRECT rc = (LPRECT) sp_e->lParam; LPRECT rc = (LPRECT) sp_e->lParam;
if (rc) { if (rc)
TRACE("lParam rect (%d,%d)-(%d,%d)\n", TRACE("lParam rect (%s)\n", wine_dbgstr_rect(rc));
rc->left, rc->top, rc->right, rc->bottom);
}
break; break;
} }
case LVM_SETITEMPOSITION32: case LVM_SETITEMPOSITION32:
...@@ -2404,10 +2402,9 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) ...@@ -2404,10 +2402,9 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
lpdis->CtlType, lpdis->CtlID); lpdis->CtlType, lpdis->CtlID);
TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n", TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
lpdis->itemID, lpdis->itemAction, lpdis->itemState); lpdis->itemID, lpdis->itemAction, lpdis->itemState);
TRACE("hWnd=%p hDC=%p (%d,%d)-(%d,%d) itemData=0x%08lx\n", TRACE("hWnd=%p hDC=%p (%s) itemData=0x%08lx\n",
lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left, lpdis->hwndItem, lpdis->hDC,
lpdis->rcItem.top, lpdis->rcItem.right, wine_dbgstr_rect(&lpdis->rcItem), lpdis->itemData);
lpdis->rcItem.bottom, lpdis->itemData);
} }
break; break;
case WM_MEASUREITEM: case WM_MEASUREITEM:
...@@ -2463,8 +2460,7 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter) ...@@ -2463,8 +2460,7 @@ static void SPY_DumpStructure(const SPY_INSTANCE *sp_e, BOOL enter)
case WM_NCCALCSIZE: case WM_NCCALCSIZE:
{ {
RECT *rc = (RECT *)sp_e->lParam; RECT *rc = (RECT *)sp_e->lParam;
TRACE("Rect (%d,%d)-(%d,%d)\n", TRACE("Rect (%s)\n", wine_dbgstr_rect(rc));
rc->left, rc->top, rc->right, rc->bottom);
} }
break; break;
case WM_NOTIFY: case WM_NOTIFY:
......
...@@ -576,8 +576,7 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc, ...@@ -576,8 +576,7 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
*/ */
BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags ) BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags )
{ {
TRACE("%p %d,%d-%d,%d %04x %04x\n", TRACE("%p %s %04x %04x\n", hdc, wine_dbgstr_rect(rc), edge, flags );
hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
if(flags & BF_DIAGONAL) if(flags & BF_DIAGONAL)
return UITOOLS95_DrawDiagEdge(hdc, rc, edge, flags); return UITOOLS95_DrawDiagEdge(hdc, rc, edge, flags);
......
...@@ -170,8 +170,7 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect ) ...@@ -170,8 +170,7 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect )
if (ret) if (ret)
{ {
MapWindowPoints( GetAncestor( hwnd, GA_PARENT ), 0, (POINT *)rect, 2 ); MapWindowPoints( GetAncestor( hwnd, GA_PARENT ), 0, (POINT *)rect, 2 );
TRACE( "hwnd %p (%d,%d)-(%d,%d)\n", TRACE( "hwnd %p (%s)\n", hwnd, wine_dbgstr_rect(rect) );
hwnd, rect->left, rect->top, rect->right, rect->bottom);
} }
return ret; return ret;
} }
......
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