Change RECT to use LONG to match win32 standard headers and fix format
strings to use %ld for RECT elements.

diff --git a/controls/combo.c b/controls/combo.c
index cacf44c..223a1cf 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -420,13 +420,13 @@
        lprLB->right = lprLB->left + lphc->droppedWidth;
   }
 
-  TRACE("\ttext\t= (%i,%i-%i,%i)\n",
+  TRACE("\ttext\t= (%ld,%ld-%ld,%ld)\n",
 	lprEdit->left, lprEdit->top, lprEdit->right, lprEdit->bottom);
 
-  TRACE("\tbutton\t= (%i,%i-%i,%i)\n",
+  TRACE("\tbutton\t= (%ld,%ld-%ld,%ld)\n",
 	lprButton->left, lprButton->top, lprButton->right, lprButton->bottom);
 
-  TRACE("\tlbox\t= (%i,%i-%i,%i)\n",
+  TRACE("\tlbox\t= (%ld,%ld-%ld,%ld)\n",
 	lprLB->left, lprLB->top, lprLB->right, lprLB->bottom );
 }
 
@@ -477,7 +477,7 @@
      */
     if (posChanging->cy != newComboHeight)
     {
-	TRACE("posChanging->cy=%d, newComboHeight=%d, oldbot=%d, oldtop=%d\n",
+	TRACE("posChanging->cy=%d, newComboHeight=%d, oldbot=%ld, oldtop=%ld\n",
 	      posChanging->cy, newComboHeight, lphc->droppedRect.bottom,
 	      lphc->droppedRect.top);
       lphc->droppedRect.bottom = lphc->droppedRect.top + posChanging->cy - newComboHeight;
diff --git a/controls/listbox.c b/controls/listbox.c
index d2d931f..1b625b5 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -589,7 +589,7 @@
         if (!IsWindowEnabled(hwnd)) dis.itemState |= ODS_DISABLED;
         dis.itemData     = item ? item->data : 0;
         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=%ld,%ld-%ld,%ld\n",
               hwnd, index, item ? debugstr_w(item->str) : "", action,
               dis.itemState, rect->left, rect->top, rect->right, rect->bottom );
         SendMessageW(descr->owner, WM_DRAWITEM, id, (LPARAM)&dis);
@@ -609,7 +609,7 @@
             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=%ld,%ld-%ld,%ld\n",
               hwnd, index, item ? debugstr_w(item->str) : "", action,
               rect->left, rect->top, rect->right, rect->bottom );
         if (!item)
diff --git a/controls/menu.c b/controls/menu.c
index 8be53a1..f90ed2c 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -965,7 +965,7 @@
 	                   - arrow_bitmap_width;
 	}
     }
-    TRACE("(%d,%d)-(%d,%d)\n", lpitem->rect.left, lpitem->rect.top, lpitem->rect.right, lpitem->rect.bottom);
+    TRACE("(%ld,%ld)-(%ld,%ld)\n", lpitem->rect.left, lpitem->rect.top, lpitem->rect.right, lpitem->rect.bottom);
 }
 
 
@@ -1058,8 +1058,8 @@
 
     if ((lprect == NULL) || (lppop == NULL)) return;
     if (lppop->nItems == 0) return;
-    TRACE("left=%d top=%d right=%d bottom=%d\n",
-                 lprect->left, lprect->top, lprect->right, lprect->bottom);
+    TRACE("left=%ld top=%ld right=%ld bottom=%ld\n",
+          lprect->left, lprect->top, lprect->right, lprect->bottom);
     lppop->Width  = lprect->right - lprect->left;
     lppop->Height = 0;
     maxY = lprect->top+1;
@@ -1169,7 +1169,7 @@
         dis.hDC        = hdc;
         dis.rcItem     = lpitem->rect;
         TRACE("Ownerdraw: owner=%p itemID=%d, itemState=%d, itemAction=%d, "
-	      "hwndItem=%p, hdc=%p, rcItem={%d,%d,%d,%d}\n", hwndOwner,
+	      "hwndItem=%p, hdc=%p, rcItem={%ld,%ld,%ld,%ld}\n", hwndOwner,
 	      dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem,
 	      dis.hDC, dis.rcItem.left, dis.rcItem.top, dis.rcItem.right,
 	      dis.rcItem.bottom);
@@ -1177,7 +1177,7 @@
         /* Fall through to draw popup-menu arrow */
     }
 
-    TRACE("rect={%d,%d,%d,%d}\n", lpitem->rect.left, lpitem->rect.top,
+    TRACE("rect={%ld,%ld,%ld,%ld}\n", lpitem->rect.left, lpitem->rect.top,
 					lpitem->rect.right,lpitem->rect.bottom);
 
     if (menuBar && (lpitem->fType & MF_SEPARATOR)) return;
@@ -2688,7 +2688,7 @@
     mt.pt.x = x;
     mt.pt.y = y;
 
-    TRACE("hmenu=%p flags=0x%08x (%d,%d) hwnd=%p (%d,%d)-(%d,%d)\n",
+    TRACE("hmenu=%p flags=0x%08x (%d,%d) hwnd=%p (%ld,%ld)-(%ld,%ld)\n",
           hmenu, wFlags, x, y, hwnd, (lprect) ? lprect->left : 0, (lprect) ? lprect->top : 0,
           (lprect) ? lprect->right : 0,  (lprect) ? lprect->bottom : 0);
 
diff --git a/controls/uitools.c b/controls/uitools.c
index abc0640..2592125 100644
--- a/controls/uitools.c
+++ b/controls/uitools.c
@@ -580,7 +580,7 @@
  */
 BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags )
 {
-    TRACE("%p %d,%d-%d,%d %04x %04x\n",
+    TRACE("%p %ld,%ld-%ld,%ld %04x %04x\n",
           hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
 
     if(flags & BF_DIAGONAL)
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index cadae82..235a839 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -385,7 +385,7 @@
     h = mysize.cy + 1;
     y = rect.bottom - h - 1;
 
-    TRACE("Combo client (%d,%d)-(%d,%d), setting Edit to (%d,%d)-(%d,%d)\n",
+    TRACE("Combo client (%ld,%ld)-(%ld,%ld), setting Edit to (%d,%d)-(%d,%d)\n",
 	  rect.left, rect.top, rect.right, rect.bottom, x, y, x + w, y + h);
     SetWindowPos(infoPtr->hwndEdit, HWND_TOP, x, y, w, h,
 		 SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
@@ -891,10 +891,10 @@
     height = cb_wrect.bottom-cb_wrect.top
              + cbx_wrect.bottom-cbx_wrect.top
              - (cbx_crect.bottom-cbx_crect.top);
-    TRACE("EX window=(%d,%d)-(%d,%d), client=(%d,%d)-(%d,%d)\n",
+    TRACE("EX window=(%ld,%ld)-(%ld,%ld), client=(%ld,%ld)-(%ld,%ld)\n",
 	  cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
 	  cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
-    TRACE("CB window=(%d,%d)-(%d,%d), EX setting=(0,0)-(%d,%d)\n",
+    TRACE("CB window=(%ld,%ld)-(%ld,%ld), EX setting=(0,0)-(%ld,%d)\n",
 	  cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
 	  cbx_wrect.right-cbx_wrect.left, height);
     SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0,
@@ -942,7 +942,7 @@
     /* create combo box */
     GetWindowRect(hwnd, &wnrc1);
     GetClientRect(hwnd, &clrc1);
-    TRACE("EX window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d)\n",
+    TRACE("EX window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld)\n",
 	  wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
 	  clrc1.left, clrc1.top, clrc1.right, clrc1.bottom);
 
@@ -1033,7 +1033,7 @@
     GetWindowRect(hwnd, &wnrc1);
     GetClientRect(hwnd, &clrc1);
     GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
-    TRACE("EX window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) CB wnd=(%d,%d)-(%d,%d)\n",
+    TRACE("EX window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) CB wnd=(%ld,%ld)-(%ld,%ld)\n",
 	  wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
 	  clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
 	  cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
@@ -1042,7 +1042,7 @@
 		 SWP_NOACTIVATE | SWP_NOREDRAW);
 
     GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
-    TRACE("CB window=(%d,%d)-(%d,%d)\n",
+    TRACE("CB window=(%ld,%ld)-(%ld,%ld)\n",
 	  cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
     SetWindowPos(hwnd, HWND_TOP,
 		 0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top,
@@ -1291,7 +1291,7 @@
 	  dis->CtlType, dis->CtlID);
     TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
 	  dis->itemID, dis->itemAction, dis->itemState);
-    TRACE("hWnd=%p hDC=%p (%d,%d)-(%d,%d) itemData=0x%08lx\n",
+    TRACE("hWnd=%p hDC=%p (%ld,%ld)-(%ld,%ld) itemData=0x%08lx\n",
 	  dis->hwndItem, dis->hDC, dis->rcItem.left,
 	  dis->rcItem.top, dis->rcItem.right, dis->rcItem.bottom,
 	  dis->itemData);
@@ -1311,7 +1311,7 @@
 	if ( ( (dis->itemAction & ODA_FOCUS) && (dis->itemState & ODS_SELECTED)) ||
 	     ( (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) && (dis->itemState & ODS_FOCUS) ) ) {
 
-	    TRACE("drawing item -1 special focus, rect=(%d,%d)-(%d,%d)\n",
+	    TRACE("drawing item -1 special focus, rect=(%ld,%ld)-(%ld,%ld)\n",
 		  dis->rcItem.left, dis->rcItem.top,
 		  dis->rcItem.right, dis->rcItem.bottom);
 	}
@@ -1327,14 +1327,14 @@
 		edrc.left=edrc.top=edrc.right=edrc.bottom=-1;
 		if (infoPtr->hwndEdit)
 		    GetWindowRect (infoPtr->hwndEdit, &edrc);
-		TRACE("window rects ex=(%d,%d)-(%d,%d), cb=(%d,%d)-(%d,%d), ed=(%d,%d)-(%d,%d)\n",
+		TRACE("window rects ex=(%ld,%ld)-(%ld,%ld), cb=(%ld,%ld)-(%ld,%ld), ed=(%ld,%ld)-(%ld,%ld)\n",
 		      exrc.left, exrc.top, exrc.right, exrc.bottom,
 		      cbrc.left, cbrc.top, cbrc.right, cbrc.bottom,
 		      edrc.left, edrc.top, edrc.right, edrc.bottom);
 	    }
 	}
 	else {
-	    ERR("NOT drawing item  -1 special focus, rect=(%d,%d)-(%d,%d), action=%08x, state=%08x\n",
+	    ERR("NOT drawing item  -1 special focus, rect=(%ld,%ld)-(%ld,%ld), action=%08x, state=%08x\n",
 		dis->rcItem.left, dis->rcItem.top,
 		dis->rcItem.right, dis->rcItem.bottom,
 		dis->itemAction, dis->itemState);
@@ -1491,7 +1491,7 @@
 	    rect.right = x + txtsize.cx;
 	    rect.top = dis->rcItem.top + 1;
 	    rect.bottom = dis->rcItem.bottom - 1;
-	    TRACE("drawing item %d text, rect=(%d,%d)-(%d,%d)\n",
+	    TRACE("drawing item %d text, rect=(%ld,%ld)-(%ld,%ld)\n",
 	          dis->itemID, rect.left, rect.top, rect.right, rect.bottom);
 	    ExtTextOutW (dis->hDC, x, y, ETO_OPAQUE | ETO_CLIPPED,
 		         &rect, str, len, 0);
@@ -1617,10 +1617,10 @@
 
     TRACE("winpos=(%d,%d %dx%d) flags=0x%08x\n",
 	  wp->x, wp->y, wp->cx, wp->cy, wp->flags);
-    TRACE("EX window=(%d,%d)-(%d,%d), client=(%d,%d)-(%d,%d)\n",
+    TRACE("EX window=(%ld,%ld)-(%ld,%ld), client=(%ld,%ld)-(%ld,%ld)\n",
 	  cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
 	  cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
-    TRACE("CB window=(%d,%d)-(%d,%d), EX setting=(0,0)-(%d,%d)\n",
+    TRACE("CB window=(%ld,%ld)-(%ld,%ld), EX setting=(0,0)-(%d,%ld)\n",
 	  cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
 	  width, cb_wrect.bottom-cb_wrect.top);
 
@@ -1702,7 +1702,7 @@
             hDC = (HDC) wParam;
 	    obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
             GetClientRect (hwnd, &rect);
-	    TRACE("erasing (%d,%d)-(%d,%d)\n",
+	    TRACE("erasing (%ld,%ld)-(%ld,%ld)\n",
 		  rect.left, rect.top, rect.right, rect.bottom);
 	    ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
             SetBkColor (hDC, obkc);
@@ -1907,7 +1907,7 @@
             hDC = (HDC) wParam;
 	    obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
             GetClientRect (hwnd, &rect);
-	    TRACE("erasing (%d,%d)-(%d,%d)\n",
+	    TRACE("erasing (%ld,%ld)-(%ld,%ld)\n",
 		  rect.left, rect.top, rect.right, rect.bottom);
 	    ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
             SetBkColor (hDC, obkc);
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index 3311c7c..a87e72b 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -1098,7 +1098,7 @@
   infoPtr->rcClient.bottom = HIWORD(lParam);
   infoPtr->rcClient.right = LOWORD(lParam);
 
-  TRACE("Height=%d, Width=%d\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
+  TRACE("Height=%ld, Width=%ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
 
   /* use DrawEdge to adjust the size of rcEdge to get rcDraw */
   memcpy((&infoPtr->rcDraw), (&infoPtr->rcClient), sizeof(infoPtr->rcDraw));
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 092326d..2e0936b 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -546,7 +546,7 @@
     if (rect) 
     {
 	char* buf = debug_getbuf();
-	snprintf(buf, DEBUG_BUFFER_SIZE, "[(%d, %d);(%d, %d)]", 
+	snprintf(buf, DEBUG_BUFFER_SIZE, "[(%ld, %ld);(%ld, %ld)]",
 		 rect->left, rect->top, rect->right, rect->bottom);
     	return buf;
     } else return "(null)";
@@ -5204,7 +5204,7 @@
         break;
 
     default:
-	WARN("Unknown value: %d\n", lprc->left);
+	WARN("Unknown value: %ld\n", lprc->left);
 	return FALSE;
     }
 
@@ -5240,7 +5240,7 @@
     
     if (!lprc || (infoPtr->dwStyle & LVS_TYPEMASK) != LVS_REPORT) return FALSE;
     
-    TRACE("(nItem=%d, nSubItem=%d)\n", nItem, lprc->top);
+    TRACE("(nItem=%d, nSubItem=%ld)\n", nItem, lprc->top);
     /* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
     if (lprc->top == 0)
         return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
@@ -5264,7 +5264,7 @@
         break;
 
     default:
-	ERR("Unknown bounds=%d\n", lprc->left);
+	ERR("Unknown bounds=%ld\n", lprc->left);
 	return FALSE;
     }
 
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index e4d79e4..46a67d9 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -341,7 +341,7 @@
     RECT r2;
 
     TRACE("%d %d %d\n",day, infoPtr->minSel.wDay, infoPtr->maxSel.wDay);
-    TRACE("%d %d %d %d\n", r.left, r.top, r.right, r.bottom);
+    TRACE("%ld %ld %ld %ld\n", r.left, r.top, r.right, r.bottom);
     oldCol = SetTextColor(hdc, infoPtr->monthbk);
     oldBk = SetBkColor(hdc, infoPtr->trailingtxt);
     hbr = GetSysColorBrush(COLOR_GRAYTEXT);
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index d03c35b..6a239e6 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -897,7 +897,7 @@
 
     DefWindowProcA (hwnd, WM_NCCALCSIZE, wParam, lParam);
 
-    TRACE("orig rect=(%d,%d)-(%d,%d)\n",
+    TRACE("orig rect=(%ld,%ld)-(%ld,%ld)\n",
 	  lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
 
     if (PAGER_IsHorizontal(hwnd))
@@ -912,7 +912,7 @@
 	/* Reset buttons and hide any grey ones */
 	scrollRange = infoPtr->nWidth - (rcmyw.right - rcmyw.left);
 
-	TRACE("nPos=%d, scrollrange=%d, nHeigth=%d, myw=(%d,%d)-(%d,%d), cursor=(%ld,%ld)\n",
+	TRACE("nPos=%d, scrollrange=%d, nHeigth=%d, myw=(%ld,%ld)-(%ld,%ld), cursor=(%ld,%ld)\n",
 	      infoPtr->nPos, scrollRange, infoPtr->nHeight,
 	      rcmyw.left, rcmyw.top,
 	      rcmyw.right, rcmyw.bottom,
@@ -926,7 +926,7 @@
 	    ltrc.right = ltrc.left + infoPtr->nButtonSize;
 	    rbrc = wnrc;
 	    rbrc.left = rbrc.right - infoPtr->nButtonSize;
-	    TRACE("horz lt rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n",
+	    TRACE("horz lt rect=(%ld,%ld)-(%ld,%ld), rb rect=(%ld,%ld)-(%ld,%ld)\n",
 		  ltrc.left, ltrc.top, ltrc.right, ltrc.bottom,
 		  rbrc.left, rbrc.top, rbrc.right, rbrc.bottom);
 	    if (PtInRect (&ltrc, cursor) && infoPtr->TLbtnState)
@@ -961,7 +961,7 @@
 	/* Reset buttons and hide any grey ones */
 	scrollRange = infoPtr->nHeight - (rcmyw.bottom - rcmyw.top);
 
-	TRACE("nPos=%d, scrollrange=%d, nHeigth=%d, myw=(%d,%d)-(%d,%d), cursor=(%ld,%ld)\n",
+	TRACE("nPos=%d, scrollrange=%d, nHeigth=%d, myw=(%ld,%ld)-(%ld,%ld), cursor=(%ld,%ld)\n",
 	      infoPtr->nPos, scrollRange, infoPtr->nHeight,
 	      rcmyw.left, rcmyw.top,
 	      rcmyw.right, rcmyw.bottom,
@@ -986,7 +986,7 @@
 	    ltrc.right = ltrc.left + infoPtr->nButtonSize;
 	    rbrc = wnrc;
 	    rbrc.left = rbrc.right - infoPtr->nButtonSize;
-	    TRACE("vert lt rect=(%d,%d)-(%d,%d), rb rect=(%d,%d)-(%d,%d)\n",
+	    TRACE("vert lt rect=(%ld,%ld)-(%ld,%ld), rb rect=(%ld,%ld)-(%ld,%ld)\n",
 		  ltrc.left, ltrc.top, ltrc.right, ltrc.bottom,
 		  rbrc.left, rbrc.top, rbrc.right, rbrc.bottom);
 	    if (PtInRect (&ltrc, cursor) && infoPtr->TLbtnState)
@@ -1003,7 +1003,7 @@
 	    lpRect->bottom = infoPtr->nHeight;
     }
 
-    TRACE("[%p] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n",
+    TRACE("[%p] client rect set to %ldx%ld at (%ld,%ld) BtnState[%d,%d]\n",
 	  hwnd, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top,
 	  lpRect->left, lpRect->top,
 	  infoPtr->TLbtnState, infoPtr->BRbtnState);
@@ -1232,7 +1232,7 @@
 
 	/* If in one of the buttons the capture and draw buttons */
 	if (btnrect) {
-	    TRACE("[%p] draw btn (%d,%d)-(%d,%d), Capture %s, style %08lx\n",
+	    TRACE("[%p] draw btn (%ld,%ld)-(%ld,%ld), Capture %s, style %08lx\n",
 		  hwnd, btnrect->left, btnrect->top,
 		  btnrect->right, btnrect->bottom,
 		  (infoPtr->bCapture) ? "TRUE" : "FALSE",
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 8389fe5..4d9b2c0 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -622,7 +622,7 @@
    * Original tab size.
    */
   GetClientRect(hwndTabCtrl, &rcOrigTab);
-  TRACE("orig tab %d %d %d %d\n", rcOrigTab.left, rcOrigTab.top,
+  TRACE("orig tab %ld %ld %ld %ld\n", rcOrigTab.left, rcOrigTab.top,
         rcOrigTab.right, rcOrigTab.bottom);
 
   /*
@@ -634,7 +634,7 @@
   rcPage.bottom = psInfo->height;
 
   MapDialogRect(hwndDlg, &rcPage);
-  TRACE("biggest page %d %d %d %d\n", rcPage.left, rcPage.top,
+  TRACE("biggest page %ld %ld %ld %ld\n", rcPage.left, rcPage.top,
         rcPage.right, rcPage.bottom);
 
   if ( (rcPage.right - rcPage.left) != (rcOrigTab.right - rcOrigTab.left) )
@@ -676,7 +676,7 @@
   rcPage.bottom = psInfo->height;
 
   MapDialogRect(hwndDlg, &rcPage);
-  TRACE("biggest page %d %d %d %d\n", rcPage.left, rcPage.top,
+  TRACE("biggest page %ld %ld %ld %ld\n", rcPage.left, rcPage.top,
         rcPage.right, rcPage.bottom);
 
   if (rcPage.right > rcSheetClient.right)
@@ -747,14 +747,14 @@
 
   rc.right -= rc.left;
   rc.bottom -= rc.top;
-  TRACE("setting tab %08lx, rc (0,0)-(%d,%d)\n",
+  TRACE("setting tab %08lx, rc (0,0)-(%ld,%ld)\n",
         (DWORD)hwndTabCtrl, rc.right, rc.bottom);
   SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
 
   GetClientRect(hwndTabCtrl, &rc);
 
-  TRACE("tab client rc %d %d %d %d\n",
+  TRACE("tab client rc %ld %ld %ld %ld\n",
         rc.left, rc.top, rc.right, rc.bottom);
 
   rc.right += ((padding.x * 2) + tabOffsetX);
@@ -763,7 +763,7 @@
   /*
    * Resize the property sheet.
    */
-  TRACE("setting dialog %08lx, rc (0,0)-(%d,%d)\n",
+  TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n",
         (DWORD)hwndDlg, rc.right, rc.bottom);
   SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
@@ -821,7 +821,7 @@
       psInfo->width  = MulDiv((rc.right - rc.left), 4, units.left);
   }
 
-  TRACE("Biggest page %d %d %d %d\n", rc.left, rc.top, rc.right, rc.bottom);
+  TRACE("Biggest page %ld %ld %ld %ld\n", rc.left, rc.top, rc.right, rc.bottom);
   TRACE("   constants padx=%d, pady=%d, butH=%d, lH=%d\n",
 	padding.x, padding.y, buttonHeight, lineHeight);
 
@@ -832,7 +832,7 @@
   /*
    * Resize the property sheet.
    */
-  TRACE("setting dialog %08lx, rc (0,0)-(%d,%d)\n",
+  TRACE("setting dialog %08lx, rc (0,0)-(%ld,%ld)\n",
         (DWORD)hwndDlg, rc.right, rc.bottom);
   SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
@@ -1424,7 +1424,7 @@
       pageHeight = rc.bottom - rc.top;
 
       padding = PROPSHEET_GetPaddingInfoWizard(hwndParent, psInfo);
-      TRACE("setting page %08lx, rc (%d,%d)-(%d,%d) w=%d, h=%d, padx=%d, pady=%d\n",
+      TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d, padx=%d, pady=%d\n",
 	    (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom,
 	    pageWidth, pageHeight, padding.x, padding.y);
       SetWindowPos(hwndPage, HWND_TOP,
@@ -1440,7 +1440,7 @@
       PROPSHEET_GetPageRect(psInfo, hwndParent, &rc);
       pageWidth = rc.right - rc.left;
       pageHeight = rc.bottom - rc.top;
-      TRACE("setting page %08lx, rc (%d,%d)-(%d,%d) w=%d, h=%d\n",
+      TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d\n",
 	    (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom,
 	    pageWidth, pageHeight);
       SetWindowPos(hwndPage, HWND_TOP,
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index b85416e..8878177 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -466,11 +466,11 @@
 		  i, (pB->lpText) ? debugstr_w(pB->lpText) : "(null)");
 	TRACE("band # %u: lcx=%u, ccx=%u, hcx=%u, lcy=%u, ccy=%u, hcy=%u, offChild=%ld,%ld\n",
 	      i, pB->lcx, pB->ccx, pB->hcx, pB->lcy, pB->ccy, pB->hcy, pB->offChild.cx, pB->offChild.cy);
-	TRACE("band # %u: fStatus=%08x, fDraw=%08x, Band=(%d,%d)-(%d,%d), Grip=(%d,%d)-(%d,%d)\n",
+	TRACE("band # %u: fStatus=%08x, fDraw=%08x, Band=(%ld,%ld)-(%ld,%ld), Grip=(%ld,%ld)-(%ld,%ld)\n",
 	      i, pB->fStatus, pB->fDraw,
 	      pB->rcBand.left, pB->rcBand.top, pB->rcBand.right, pB->rcBand.bottom,
 	      pB->rcGripper.left, pB->rcGripper.top, pB->rcGripper.right, pB->rcGripper.bottom);
-	TRACE("band # %u: Img=(%d,%d)-(%d,%d), Txt=(%d,%d)-(%d,%d), Child=(%d,%d)-(%d,%d)\n",
+	TRACE("band # %u: Img=(%ld,%ld)-(%ld,%ld), Txt=(%ld,%ld)-(%ld,%ld), Child=(%ld,%ld)-(%ld,%ld)\n",
 	      i,
 	      pB->rcCapImage.left, pB->rcCapImage.top, pB->rcCapImage.right, pB->rcCapImage.bottom,
 	      pB->rcCapText.left, pB->rcCapText.top, pB->rcCapText.right, pB->rcCapText.bottom,
@@ -679,7 +679,7 @@
 	    (lpBand->rcoldBand.right !=lpBand->rcBand.right) ||
 	    (lpBand->rcoldBand.bottom !=lpBand->rcBand.bottom)) {
 	    lpBand->fDraw |= NTF_INVALIDATE;
-	    TRACE("band %d row=%d: changed to (%d,%d)-(%d,%d) from (%d,%d)-(%d,%d)\n",
+	    TRACE("band %d row=%d: changed to (%ld,%ld)-(%ld,%ld) from (%ld,%ld)-(%ld,%ld)\n",
 		  i, lpBand->iRow,
 		  lpBand->rcBand.left, lpBand->rcBand.top,
 		  lpBand->rcBand.right, lpBand->rcBand.bottom,
@@ -687,7 +687,7 @@
 		  lpBand->rcoldBand.right, lpBand->rcoldBand.bottom);
 	}
 	else
-	    TRACE("band %d row=%d: unchanged (%d,%d)-(%d,%d)\n",
+	    TRACE("band %d row=%d: unchanged (%ld,%ld)-(%ld,%ld)\n",
 		  i, lpBand->iRow,
 		  lpBand->rcBand.left, lpBand->rcBand.top,
 		  lpBand->rcBand.right, lpBand->rcBand.bottom);
@@ -763,7 +763,7 @@
 	    lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
 	else
 	    lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
-	TRACE("Phase 1 band %d, (%d,%d)-(%d,%d), orig x=%d, xsep=%d\n",
+	TRACE("Phase 1 band %d, (%ld,%ld)-(%ld,%ld), orig x=%d, xsep=%d\n",
 	      i, lpBand->rcBand.left, lpBand->rcBand.top,
 	      lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
 	x = rcBrb(lpBand);
@@ -833,7 +833,7 @@
 	    lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
 	else
 	    lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
-	TRACE("Phase 2 band %d, (%d,%d)-(%d,%d), orig x=%d, xsep=%d\n",
+	TRACE("Phase 2 band %d, (%ld,%ld)-(%ld,%ld), orig x=%d, xsep=%d\n",
 	      i, lpBand->rcBand.left, lpBand->rcBand.top,
 	      lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
 	x = rcBrb(lpBand);
@@ -961,14 +961,14 @@
 	  ((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
 	   (oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
 	  TRACE("Child rectangle changed for band %u\n", i);
-	  TRACE("    from (%d,%d)-(%d,%d)  to (%d,%d)-(%d,%d)\n",
+	  TRACE("    from (%ld,%ld)-(%ld,%ld)  to (%ld,%ld)-(%ld,%ld)\n",
 		oldChild.left, oldChild.top,
 	        oldChild.right, oldChild.bottom,
 		lpBand->rcChild.left, lpBand->rcChild.top,
 	        lpBand->rcChild.right, lpBand->rcChild.bottom);
       }
       if (lpBand->fDraw & NTF_INVALIDATE) {
-	  TRACE("invalidating (%d,%d)-(%d,%d)\n",
+	  TRACE("invalidating (%ld,%ld)-(%ld,%ld)\n",
 		lpBand->rcBand.left,
 		lpBand->rcBand.top,
 		lpBand->rcBand.right + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0),
@@ -1100,14 +1100,14 @@
 	    ((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
 	     (oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
 	    TRACE("Child rectangle changed for band %u\n", i);
-	    TRACE("    from (%d,%d)-(%d,%d)  to (%d,%d)-(%d,%d)\n",
+	    TRACE("    from (%ld,%ld)-(%ld,%ld)  to (%ld,%ld)-(%ld,%ld)\n",
 		  oldChild.left, oldChild.top,
 		  oldChild.right, oldChild.bottom,
 		  lpBand->rcChild.left, lpBand->rcChild.top,
 		  lpBand->rcChild.right, lpBand->rcChild.bottom);
 	}
 	if (lpBand->fDraw & NTF_INVALIDATE) {
-	    TRACE("invalidating (%d,%d)-(%d,%d)\n",
+	    TRACE("invalidating (%ld,%ld)-(%ld,%ld)\n",
 		  lpBand->rcBand.left,
 		  lpBand->rcBand.top,
 		  lpBand->rcBand.right + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0),
@@ -1140,7 +1140,7 @@
 
     GetClientRect (infoPtr->hwndSelf, &rc);
 
-    TRACE( " old [%ld x %ld], new [%ld x %ld], client [%d x %d]\n",
+    TRACE( " old [%ld x %ld], new [%ld x %ld], client [%ld x %ld]\n",
 	   infoPtr->oldSize.cx, infoPtr->oldSize.cy,
 	   infoPtr->calcSize.cx, infoPtr->calcSize.cy,
 	   rc.right, rc.bottom);
@@ -1264,7 +1264,7 @@
 	    REBAR_Notify ((NMHDR *)&rbcz, infoPtr, RBN_CHILDSIZE);
 	    if (!EqualRect (&lpBand->rcChild, &rbcz.rcChild)) {
 		TRACE("Child rect changed by NOTIFY for band %u\n", i);
-		TRACE("    from (%d,%d)-(%d,%d)  to (%d,%d)-(%d,%d)\n",
+		TRACE("    from (%ld,%ld)-(%ld,%ld)  to (%ld,%ld)-(%ld,%ld)\n",
 		      lpBand->rcChild.left, lpBand->rcChild.top,
 		      lpBand->rcChild.right, lpBand->rcChild.bottom,
 		      rbcz.rcChild.left, rbcz.rcChild.top,
@@ -1295,7 +1295,7 @@
 		yPos = (lpBand->rcChild.bottom + lpBand->rcChild.top - nEditHeight)/2;
 
 		/* center combo box inside child area */
-		TRACE("moving child (Combo(Ex)) %p to (%d,%d) for (%d,%d)\n",
+		TRACE("moving child (Combo(Ex)) %p to (%ld,%d) for (%ld,%d)\n",
 		      lpBand->hwndChild,
 		      lpBand->rcChild.left, yPos,
 		      lpBand->rcChild.right - lpBand->rcChild.left,
@@ -1310,7 +1310,7 @@
 		    ERR("DeferWindowPos returned NULL\n");
 	    }
 	    else {
-		TRACE("moving child (Other) %p to (%d,%d) for (%d,%d)\n",
+		TRACE("moving child (Other) %p to (%ld,%ld) for (%ld,%ld)\n",
 		      lpBand->hwndChild,
 		      lpBand->rcChild.left, lpBand->rcChild.top,
 		      lpBand->rcChild.right - lpBand->rcChild.left,
@@ -1370,12 +1370,12 @@
     if (!infoPtr->DoRedraw) infoPtr->fStatus |= BAND_NEEDS_REDRAW;
 
     GetClientRect (infoPtr->hwndSelf, &rcClient);
-    TRACE("Client is (%d,%d)-(%d,%d)\n",
+    TRACE("Client is (%ld,%ld)-(%ld,%ld)\n",
 	  rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
 
     if (lpRect) {
 	rcAdj = *lpRect;
-	TRACE("adjustment rect is (%d,%d)-(%d,%d)\n",
+	TRACE("adjustment rect is (%ld,%ld)-(%ld,%ld)\n",
 	      rcAdj.left, rcAdj.top, rcAdj.right, rcAdj.bottom);
     }
     else {
@@ -1531,7 +1531,7 @@
 	    lpBand->uMinHeight = lpBand->lcy;
 	    x = rightx;
 	}
-	TRACE("P1 band %u, row %d, (%d,%d)-(%d,%d)\n",
+	TRACE("P1 band %u, row %d, (%ld,%ld)-(%ld,%ld)\n",
 	      i, row,
 	      lpBand->rcBand.left, lpBand->rcBand.top,
 	      lpBand->rcBand.right, lpBand->rcBand.bottom);
@@ -1672,11 +1672,11 @@
 			current->rcBand.bottom = current->rcBand.top + new_rh;
 			y += adj_rh;
 		    }
-		    TRACE("P2 moving band %d to own row at (%d,%d)-(%d,%d)\n",
+		    TRACE("P2 moving band %d to own row at (%ld,%ld)-(%ld,%ld)\n",
 			  current_idx,
 			  current->rcBand.left, current->rcBand.top,
 			  current->rcBand.right, current->rcBand.bottom);
-		    TRACE("P2 prev band %d at (%d,%d)-(%d,%d)\n",
+		    TRACE("P2 prev band %d at (%ld,%ld)-(%ld,%ld)\n",
 			  prev_idx,
 			  prev->rcBand.left, prev->rcBand.top,
 			  prev->rcBand.right, prev->rcBand.bottom);
@@ -1779,7 +1779,7 @@
 		lpBand->rcBand.right = lpBand->rcBand.left + j;
 	    else
 		lpBand->rcBand.bottom = lpBand->rcBand.top + j;
-	    TRACE("P2b band %d, row %d changed to (%d,%d)-(%d,%d)\n",
+	    TRACE("P2b band %d, row %d changed to (%ld,%ld)-(%ld,%ld)\n",
 		  iband, lpBand->iRow,
 		  lpBand->rcBand.left, lpBand->rcBand.top,
 		  lpBand->rcBand.right, lpBand->rcBand.bottom);
@@ -2141,7 +2141,7 @@
 		    rcRowSep.right = infoPtr->calcSize.cx;
 		    DrawEdge (hdc, &rcRowSep, EDGE_ETCHED, BF_BOTTOM);
 		}
-		TRACE ("drawing band separator bottom (%d,%d)-(%d,%d)\n",
+		TRACE ("drawing band separator bottom (%ld,%ld)-(%ld,%ld)\n",
 		       rcRowSep.left, rcRowSep.top,
 		       rcRowSep.right, rcRowSep.bottom);
 	    }
@@ -2159,7 +2159,7 @@
 		rcSep.right += SEP_WIDTH_SIZE;
 		DrawEdge (hdc, &rcSep, EDGE_ETCHED, BF_RIGHT);
 	    }
-	    TRACE("drawing band separator right (%d,%d)-(%d,%d)\n",
+	    TRACE("drawing band separator right (%ld,%ld)-(%ld,%ld)\n",
 		  rcSep.left, rcSep.top, rcSep.right, rcSep.bottom);
 	}
 
@@ -2186,7 +2186,7 @@
 	old = SetBkColor (hdc, new);
 
 	rect = lpBand->rcBand;
-	TRACE("%s background color=0x%06lx, band (%d,%d)-(%d,%d), clip (%d,%d)-(%d,%d)\n",
+	TRACE("%s background color=0x%06lx, band (%ld,%ld)-(%ld,%ld), clip (%ld,%ld)-(%ld,%ld)\n",
 	      (lpBand->clrBack == CLR_NONE) ? "none" :
 	        ((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
 	      GetBkColor(hdc),
@@ -2340,7 +2340,7 @@
     LEADJ(band, Leadjust);
     READJ(band, Readjust);
 
-    TRACE("band %d:  left=%d, right=%d, move=%d, rtn=%d, rcBand=(%d,%d)-(%d,%d)\n",
+    TRACE("band %d:  left=%d, right=%d, move=%d, rtn=%d, rcBand=(%ld,%ld)-(%ld,%ld)\n",
 	  i, Leadjust, Readjust, movement, ret,
 	  band->rcBand.left, band->rcBand.top,
 	  band->rcBand.right, band->rcBand.bottom);
@@ -2864,7 +2864,7 @@
     lpBand = &infoPtr->bands[iBand];
     CopyRect (lprc, &lpBand->rcBand);
 
-    TRACE("band %d, (%d,%d)-(%d,%d)\n", iBand,
+    TRACE("band %d, (%ld,%ld)-(%ld,%ld)\n", iBand,
 	  lprc->left, lprc->top, lprc->right, lprc->bottom);
 
     return TRUE;
@@ -3208,7 +3208,7 @@
 	movement = lpBand->rcBand.right - lpBand->rcBand.left -
 	    lpBand->cxHeader;
     if (movement < 0) {
-	ERR("something is wrong, band=(%d,%d)-(%d,%d), cxheader=%d\n",
+	ERR("something is wrong, band=(%ld,%ld)-(%ld,%ld), cxheader=%d\n",
 	    lpBand->rcBand.left, lpBand->rcBand.top,
 	    lpBand->rcBand.right, lpBand->rcBand.bottom,
 	    lpBand->cxHeader);
@@ -3620,15 +3620,15 @@
     if (lpRect == NULL)
        return FALSE;
 
-    TRACE("[%d %d %d %d]\n",
+    TRACE("[%ld %ld %ld %ld]\n",
 	  lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
 
     /*  what is going on???? */
     GetWindowRect(infoPtr->hwndSelf, &t1);
-    TRACE("window rect [%d %d %d %d]\n",
+    TRACE("window rect [%ld %ld %ld %ld]\n",
 	  t1.left, t1.top, t1.right, t1.bottom);
     GetClientRect(infoPtr->hwndSelf, &t1);
-    TRACE("client rect [%d %d %d %d]\n",
+    TRACE("client rect [%ld %ld %ld %ld]\n",
 	  t1.left, t1.top, t1.right, t1.bottom);
 
     /* force full _Layout processing */
@@ -3650,7 +3650,7 @@
     if (TRACE_ON(rebar)) {
 	GetWindowRect(infoPtr->hwndSelf, &wnrc1);
 	GetClientRect(infoPtr->hwndSelf, &clrc1);
-	TRACE("window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) cs=(%d,%d %dx%d)\n",
+	TRACE("window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) cs=(%d,%d %dx%d)\n",
 	      wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
 	      clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
 	      cs->x, cs->y, cs->cx, cs->cy);
@@ -3827,7 +3827,7 @@
 	InflateRect((LPRECT)lParam, -GetSystemMetrics(SM_CXEDGE),
 		    -GetSystemMetrics(SM_CYEDGE));
     }
-    TRACE("new client=(%d,%d)-(%d,%d)\n",
+    TRACE("new client=(%ld,%ld)-(%ld,%ld)\n",
 	  ((LPRECT)lParam)->left, ((LPRECT)lParam)->top,
 	  ((LPRECT)lParam)->right, ((LPRECT)lParam)->bottom);
     return 0;
@@ -3852,7 +3852,7 @@
     if (TRACE_ON(rebar)) {
 	GetWindowRect(hwnd, &wnrc1);
 	GetClientRect(hwnd, &clrc1);
-	TRACE("window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) cs=(%d,%d %dx%d)\n",
+	TRACE("window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) cs=(%d,%d %dx%d)\n",
 	      wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
 	      clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
 	      cs->x, cs->y, cs->cx, cs->cy);
@@ -3985,7 +3985,7 @@
 	    return 0;
 	GetWindowRect (infoPtr->hwndSelf, &rcWindow);
 	OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
-	TRACE("rect (%d,%d)-(%d,%d)\n",
+	TRACE("rect (%ld,%ld)-(%ld,%ld)\n",
 	      rcWindow.left, rcWindow.top,
 	      rcWindow.right, rcWindow.bottom);
 	DrawEdge (hdc, &rcWindow, EDGE_ETCHED, BF_RECT);
@@ -4026,7 +4026,7 @@
     GetClientRect(infoPtr->hwndSelf, &rc);
     hdc = wParam==0 ? BeginPaint (infoPtr->hwndSelf, &ps) : (HDC)wParam;
 
-    TRACE("painting (%d,%d)-(%d,%d) client (%d,%d)-(%d,%d)\n",
+    TRACE("painting (%ld,%ld)-(%ld,%ld) client (%ld,%ld)-(%ld,%ld)\n",
 	  ps.rcPaint.left, ps.rcPaint.top,
 	  ps.rcPaint.right, ps.rcPaint.bottom,
 	  rc.left, rc.top, rc.right, rc.bottom);
@@ -4151,14 +4151,14 @@
 	TRACE("still in CreateWindow\n");
 	infoPtr->fStatus &= ~CREATE_RUNNING;
 	GetWindowRect ( infoPtr->hwndSelf, &rcWin);
-	TRACE("win rect (%d,%d)-(%d,%d)\n",
+	TRACE("win rect (%ld,%ld)-(%ld,%ld)\n",
 	      rcWin.left, rcWin.top, rcWin.right, rcWin.bottom);
 
 	if ((lParam == 0) && (rcWin.right-rcWin.left == 0) &&
 	    (rcWin.bottom-rcWin.top == 0)) {
 	    /* native control seems to do this */
 	    GetClientRect (GetParent(infoPtr->hwndSelf), &rcClient);
-	    TRACE("sizing rebar, message and client zero, parent client (%d,%d)\n",
+	    TRACE("sizing rebar, message and client zero, parent client (%ld,%ld)\n",
 		  rcClient.right, rcClient.bottom);
 	}
 	else {
@@ -4172,7 +4172,7 @@
 
 	    /* do the actual WM_SIZE request */
 	    GetClientRect (infoPtr->hwndSelf, &rcClient);
-	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n",
+	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%ld,%ld)\n",
 		  infoPtr->calcSize.cx, infoPtr->calcSize.cy,
 		  LOWORD(lParam), HIWORD(lParam),
 		  rcClient.right, rcClient.bottom);
@@ -4192,11 +4192,11 @@
 	    /* on a WM_SIZE to zero and current client not zero and AUTOSIZE */
 	    /* native seems to use the current client rect for the size      */
 	    infoPtr->fStatus |= BAND_NEEDS_LAYOUT;
-	    TRACE("sizing rebar to client (%d,%d) size is zero but AUTOSIZE set\n",
+	    TRACE("sizing rebar to client (%ld,%ld) size is zero but AUTOSIZE set\n",
 		  rcClient.right, rcClient.bottom);
 	}
 	else {
-	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%d,%d)\n",
+	    TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%ld,%ld)\n",
 		  infoPtr->calcSize.cx, infoPtr->calcSize.cy,
 		  LOWORD(lParam), HIWORD(lParam),
 		  rcClient.right, rcClient.bottom);
@@ -4210,7 +4210,7 @@
 	autosize.fChanged = 0;  /* ??? */
 	autosize.rcActual = autosize.rcTarget;  /* ??? */
 	REBAR_Notify((NMHDR *) &autosize, infoPtr, RBN_AUTOSIZE);
-	TRACE("RBN_AUTOSIZE client=(%d,%d), lp=%08lx\n",
+	TRACE("RBN_AUTOSIZE client=(%ld,%ld), lp=%08lx\n",
 	      autosize.rcTarget.right, autosize.rcTarget.bottom, lParam);
     }
 
@@ -4251,7 +4251,7 @@
     ret = DefWindowProcA(infoPtr->hwndSelf, WM_WINDOWPOSCHANGED,
 			 wParam, lParam);
     GetWindowRect(infoPtr->hwndSelf, &rc);
-    TRACE("hwnd %p new pos (%d,%d)-(%d,%d)\n",
+    TRACE("hwnd %p new pos (%ld,%ld)-(%ld,%ld)\n",
 	  infoPtr->hwndSelf, rc.left, rc.top, rc.right, rc.bottom);
     return ret;
 }
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index 2b8c6d3..8a0aa2f 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -102,7 +102,7 @@
     POINT pt;
     INT i;
 
-    TRACE("draw size grip %d,%d - %d,%d\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
+    TRACE("draw size grip %ld,%ld - %ld,%ld\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
 
     pt.x = lpRect->right - 1;
     pt.y = lpRect->bottom - 1;
@@ -146,7 +146,7 @@
     RECT r = part->bound;
     UINT border = BDR_SUNKENOUTER;
 
-    TRACE("part bound %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom);
+    TRACE("part bound %ld,%ld - %ld,%ld\n", r.left, r.top, r.right, r.bottom);
     if (part->style & SBT_POPOUT)
         border = BDR_RAISEDOUTER;
     else if (part->style & SBT_NOBORDERS)
@@ -272,7 +272,7 @@
 
     /* get our window size */
     GetClientRect (infoPtr->Self, &rect);
-    TRACE("client wnd size is %d,%d - %d,%d\n", rect.left, rect.top, rect.right, rect.bottom);
+    TRACE("client wnd size is %ld,%ld - %ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom);
 
     rect.top += VERT_BORDER;
 
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index be68dcd..12e343e 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -172,7 +172,7 @@
 	TRACE("tab %d, mask=0x%08x, dwState=0x%08lx, pszText=%s, iImage=%d\n",
 	      iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
 	      ti->iImage);
-	TRACE("tab %d, lParam=0x%08lx, rect.left=%d, rect.top(row)=%d\n",
+	TRACE("tab %d, lParam=0x%08lx, rect.left=%ld, rect.top(row)=%ld\n",
 	      iItem, ti->lParam, ti->rect.left, ti->rect.top);
     }
 }
@@ -366,7 +366,7 @@
 	     SELECTED_TAB_OFFSET,
 	     0);
   }
-  TRACE("item %d tab h=%d, rect=(%d,%d)-(%d,%d)\n",
+  TRACE("item %d tab h=%d, rect=(%ld,%ld)-(%ld,%ld)\n",
 	itemIndex, infoPtr->tabHeight,
 	itemRect->left, itemRect->top, itemRect->right, itemRect->bottom);
 
@@ -487,7 +487,7 @@
    */
   if (isVisible)
   {
-      TRACE("invalidate (%d,%d)-(%d,%d)\n",
+      TRACE("invalidate (%ld,%ld)-(%ld,%ld)\n",
 	    selectedRect.left,selectedRect.top,
 	    selectedRect.right,selectedRect.bottom);
     InvalidateRect(hwnd, &selectedRect, TRUE);
@@ -1115,7 +1115,7 @@
 	  infoPtr->tabHeight, fontMetrics.tmHeight, icon_height);
   }
 
-  TRACE("client right=%d\n", clientRect.right);
+  TRACE("client right=%ld\n", clientRect.right);
 
   for (curItem = 0; curItem < infoPtr->uNumItem; curItem++)
   {
@@ -1152,7 +1152,7 @@
       infoPtr->items[curItem].rect.right = infoPtr->items[curItem].rect.left +
                                            size.cx + icon_width +
                                            num * HORIZONTAL_ITEM_PADDING;
-      TRACE("for <%s>, l,r=%d,%d, num=%d\n",
+      TRACE("for <%s>, l,r=%ld,%ld, num=%d\n",
 	  debugstr_w(infoPtr->items[curItem].pszText),
 	  infoPtr->items[curItem].rect.left,
 	  infoPtr->items[curItem].rect.right,
@@ -1176,7 +1176,7 @@
 
 	infoPtr->items[curItem].rect.left = 0;
         curItemRowCount++;
-	TRACE("wrapping <%s>, l,r=%d,%d\n",
+	TRACE("wrapping <%s>, l,r=%ld,%ld\n",
 	    debugstr_w(infoPtr->items[curItem].pszText),
 	    infoPtr->items[curItem].rect.left,
 	    infoPtr->items[curItem].rect.right);
@@ -1186,7 +1186,7 @@
     infoPtr->items[curItem].rect.top = curItemRowCount - 1;
 
     TRACE("TextSize: %li\n", size.cx);
-    TRACE("Rect: T %i, L %i, B %i, R %i\n",
+    TRACE("Rect: T %li, L %li, B %li, R %li\n",
 	  infoPtr->items[curItem].rect.top,
 	  infoPtr->items[curItem].rect.left,
 	  infoPtr->items[curItem].rect.bottom,
@@ -1250,7 +1250,7 @@
             infoPtr->items[iItm].rect.left;
           infoPtr->items[iItm].rect.left = 0;
 
-	  TRACE("r=%d, cl=%d, cl.r=%d, iCount=%d, iRow=%d, uNumRows=%d, remTab=%d, tabPerRow=%d\n",
+	  TRACE("r=%ld, cl=%d, cl.r=%ld, iCount=%d, iRow=%d, uNumRows=%d, remTab=%d, tabPerRow=%d\n",
 	      infoPtr->items[iItm].rect.right,
 	      curItemLeftPos, clientRect.right,
 	      iCount, iRow, infoPtr->uNumRows, remTab, tabPerRow);
@@ -1299,7 +1299,7 @@
           else
             curItemLeftPos = infoPtr->items[iItm].rect.right;
 
-	  TRACE("arranging <%s>, l,r=%d,%d, row=%d\n",
+	  TRACE("arranging <%s>, l,r=%ld,%ld, row=%ld\n",
 	      debugstr_w(infoPtr->items[iItm].pszText),
 	      infoPtr->items[iItm].rect.left,
 	      infoPtr->items[iItm].rect.right,
@@ -1347,7 +1347,7 @@
               infoPtr->items[iIndex].rect.left += iCount * widthDiff;
               infoPtr->items[iIndex].rect.right += (iCount + 1) * widthDiff;
 
-	      TRACE("adjusting 1 <%s>, l,r=%d,%d\n",
+	      TRACE("adjusting 1 <%s>, l,r=%ld,%ld\n",
 		  debugstr_w(infoPtr->items[iIndex].pszText),
 		  infoPtr->items[iIndex].rect.left,
 		  infoPtr->items[iIndex].rect.right);
@@ -1360,7 +1360,7 @@
           infoPtr->items[iIndexStart].rect.left = clientRect.left;
           infoPtr->items[iIndexStart].rect.right = clientRect.right - 4;
 
-	  TRACE("adjusting 2 <%s>, l,r=%d,%d\n",
+	  TRACE("adjusting 2 <%s>, l,r=%ld,%ld\n",
 	      debugstr_w(infoPtr->items[iIndexStart].pszText),
 	      infoPtr->items[iIndexStart].rect.left,
 	      infoPtr->items[iIndexStart].rect.right);
@@ -1571,7 +1571,7 @@
       else
         center_offset = ((drawRect->right - drawRect->left) - (cx + HORIZONTAL_ITEM_PADDING + (rcText.right - rcText.left))) / 2;
 
-      TRACE("for <%s>, c_o=%d, draw=(%d,%d)-(%d,%d), textlen=%d\n",
+      TRACE("for <%s>, c_o=%d, draw=(%ld,%ld)-(%ld,%ld), textlen=%ld\n",
 	  debugstr_w(infoPtr->items[iItem].pszText), center_offset,
 	  drawRect->left, drawRect->top, drawRect->right, drawRect->bottom,
 	  (rcText.right-rcText.left));
@@ -1597,7 +1597,7 @@
 	rcImage.top -= (lStyle & TCS_BOTTOM) ? 2 : 1;
       }
 
-      TRACE("drawing image=%d, left=%d, top=%d\n",
+      TRACE("drawing image=%d, left=%ld, top=%ld\n",
 	    infoPtr->items[iItem].iImage, rcImage.left, rcImage.top-1);
       ImageList_Draw
         (
@@ -1855,7 +1855,7 @@
 	  /* Adjust both rectangles to match native */
 	  r.left += (1-ZZ);
 
-	  TRACE("<left> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
+	  TRACE("<left> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
 		iItem,
 		fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
 		r.left,r.top,r.right,r.bottom);
@@ -1899,7 +1899,7 @@
 	  /* Adjust both rectangles to match native */
 	  fillRect.right += (1-ZZ);
 
-	  TRACE("<left> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
+	  TRACE("<left> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
 		iItem,
 		fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
 		r.left,r.top,r.right,r.bottom);
@@ -1956,7 +1956,7 @@
 	  r.bottom--;
 	  r.top -= ZZ;
 
-	  TRACE("<bottom> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
+	  TRACE("<bottom> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
 		iItem,
 		fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
 		r.left,r.top,r.right,r.bottom);
@@ -2001,7 +2001,7 @@
 	  /* Adjust both rectangles to match native */
 	  fillRect.bottom += (1-ZZ);
 
-	  TRACE("<top> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
+	  TRACE("<top> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
 		iItem,
 		fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
 		r.left,r.top,r.right,r.bottom);
@@ -2096,7 +2096,7 @@
     }
   }
 
-  TRACE("border=(%d,%d)-(%d,%d)\n",
+  TRACE("border=(%ld,%ld)-(%ld,%ld)\n",
 	rect.left, rect.top, rect.right, rect.bottom);
 
   DrawEdge(hdc, &rect, EDGE_RAISED, BF_SOFT|BF_RECT);
@@ -2348,7 +2348,7 @@
                       ((lStyle & TCS_BUTTONS) ? lastRow * BUTTON_SPACINGY : 0) + 2;
   }
 
-  TRACE("invalidate (%d,%d)-(%d,%d)\n",
+  TRACE("invalidate (%ld,%ld)-(%ld,%ld)\n",
 	clientRect.left,clientRect.top,
 	clientRect.right,clientRect.bottom);
   InvalidateRect(hwnd, &clientRect, TRUE);
@@ -2362,7 +2362,7 @@
 
   hdc = wParam== 0 ? BeginPaint (hwnd, &ps) : (HDC)wParam;
 
-  TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n",
+  TRACE("erase %d, rect=(%ld,%ld)-(%ld,%ld)\n",
 	ps.fErase,
 	ps.rcPaint.left,ps.rcPaint.top,ps.rcPaint.right,ps.rcPaint.bottom);
 
@@ -2386,7 +2386,7 @@
   RECT rect;
 
   GetClientRect (hwnd, &rect);
-  TRACE("Rect: %p T %i, L %i, B %i, R %i\n", hwnd,
+  TRACE("Rect: %p T %li, L %li, B %li, R %li\n", hwnd,
         rect.top, rect.left, rect.bottom, rect.right);
 
   pti = (TCITEMA *)lParam;
@@ -2461,7 +2461,7 @@
   RECT rect;
 
   GetClientRect (hwnd, &rect);
-  TRACE("Rect: %p T %i, L %i, B %i, R %i\n", hwnd,
+  TRACE("Rect: %p T %li, L %li, B %li, R %li\n", hwnd,
         rect.top, rect.left, rect.bottom, rect.right);
 
   pti = (TCITEMW *)lParam;
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index f789354..d35b2a0 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -231,7 +231,7 @@
               bP->fsState, bP->fsStyle, bP->dwData, bP->iString);
 	TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP)));
 	if (internal)
-	    TRACE("button %d id %d, hot=%s, row=%d, rect=(%d,%d)-(%d,%d)\n",
+	    TRACE("button %d id %d, hot=%s, row=%d, rect=(%ld,%ld)-(%ld,%ld)\n",
 		  btn_num, bP->idCommand,
 		  (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
 		  bP->rect.left, bP->rect.top,
@@ -474,7 +474,7 @@
 
     InflateRect (&myrect, -2, 0);
 
-    TRACE("rect=(%d,%d)-(%d,%d)\n",
+    TRACE("rect=(%ld,%ld)-(%ld,%ld)\n",
 	  myrect.left, myrect.top, myrect.right, myrect.bottom);
 
     newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
@@ -530,7 +530,7 @@
 
     /* draw text */
     if (lpText) {
-	TRACE("string rect=(%d,%d)-(%d,%d)\n",
+	TRACE("string rect=(%ld,%ld)-(%ld,%ld)\n",
 	      rcText->left, rcText->top, rcText->right, rcText->bottom);
 
 	hOldFont = SelectObject (hdc, infoPtr->hFont);
@@ -677,7 +677,7 @@
     else
         rcBitmap.top+=(infoPtr->nButtonHeight - infoPtr->nBitmapHeight) / 2;
 
-    TRACE("iBitmap: %d, start=(%d,%d) w=%d, h=%d\n",
+    TRACE("iBitmap: %d, start=(%ld,%ld) w=%d, h=%d\n",
 	  btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
 	  infoPtr->nBitmapWidth, infoPtr->nBitmapHeight);
     TRACE ("iString: %x\n", btnPtr->iString);
@@ -3242,7 +3242,7 @@
     lpSize->cx = infoPtr->rcBound.right - infoPtr->rcBound.left;
     lpSize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
 
-    TRACE("maximum size %d x %d\n",
+    TRACE("maximum size %ld x %ld\n",
 	   infoPtr->rcBound.right - infoPtr->rcBound.left,
 	   infoPtr->rcBound.bottom - infoPtr->rcBound.top);
 
@@ -4578,7 +4578,7 @@
 	    InvalidateRect(hwnd, 0, 1);
 	    GetWindowRect(hwnd, &rc);
 	    MapWindowPoints(0, hwndParent, (LPPOINT)&rc, 2);
-	    TRACE("mapped to (%d,%d)-(%d,%d)\n",
+	    TRACE("mapped to (%ld,%ld)-(%ld,%ld)\n",
 		rc.left, rc.top, rc.right, rc.bottom);
 	    lpsize->cx = max(rc.right-rc.left,
 			     infoPtr->rcBound.right - infoPtr->rcBound.left);
@@ -5397,7 +5397,7 @@
 
     hdc = wParam==0 ? BeginPaint(hwnd, &ps) : (HDC)wParam;
 
-    TRACE("psrect=(%d,%d)-(%d,%d)\n",
+    TRACE("psrect=(%ld,%ld)-(%ld,%ld)\n",
 	  ps.rcPaint.left, ps.rcPaint.top,
 	  ps.rcPaint.right, ps.rcPaint.bottom);
 
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index dde7b41..9384009 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -334,7 +334,7 @@
 	rect.top += 20;
     }
 
-    TRACE("pos %d - %d\n", rect.left, rect.top);
+    TRACE("pos %ld - %ld\n", rect.left, rect.top);
 
     rect.right = rect.left + size.cx;
     rect.bottom = rect.top + size.cy;
@@ -473,7 +473,7 @@
 	    rect.left = rcTool.right;
     }
 
-    TRACE("pos %d - %d\n", rect.left, rect.top);
+    TRACE("pos %ld - %ld\n", rect.left, rect.top);
 
     rect.right = rect.left + size.cx;
     rect.bottom = rect.top + size.cy;
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index 5befea8..f533017 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -347,7 +347,7 @@
         }
     }
 
-    TRACE("selection[left=%d, top=%d, right=%d, bottom=%d]\n",
+    TRACE("selection[left=%ld, top=%ld, right=%ld, bottom=%ld]\n",
 	   selection->left, selection->top, selection->right, selection->bottom);
 }
 
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index faedd28..8b164be 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -1971,7 +1971,7 @@
 	*lpRect = wineItem->rect;
     }
 
-    TRACE("%s [L:%d R:%d T:%d B:%d]\n", fTextRect ? "text" : "item",
+    TRACE("%s [L:%ld R:%ld T:%ld B:%ld]\n", fTextRect ? "text" : "item",
 	  lpRect->left, lpRect->right, lpRect->top, lpRect->bottom);
 
     return TRUE;
@@ -2556,7 +2556,7 @@
 
 	    InflateRect(&rcText, -2, -1); /* allow for the focus rect */
 
-	    TRACE("drawing text %s at (%d,%d)-(%d,%d)\n",
+	    TRACE("drawing text %s at (%ld,%ld)-(%ld,%ld)\n",
 		  debugstr_a(wineItem->pszText),
 		  rcText.left, rcText.top, rcText.right, rcText.bottom);
 
diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 4b4815a..77eea5d 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1456,7 +1456,7 @@
             int   copyperline   = (r->right - r->left) * bytesPerPixel;
             int j;
 
-            TRACE("Copying rect %d (%d,%d),(%d,%d) -> (%ld,%ld)\n", i, r->left, r->top, 
+            TRACE("Copying rect %d (%ld,%ld),(%ld,%ld) -> (%ld,%ld)\n", i, r->left, r->top,
                   r->right, r->bottom, p->x, p->y);
 
             /* Find where to start */
diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c
index 2686002..49b81b1 100644
--- a/dlls/d3d8/surface.c
+++ b/dlls/d3d8/surface.c
@@ -111,7 +111,7 @@
     if (!pRect) {
         pLockedRect->pBits = This->allocatedMemory;
     } else {
-        TRACE("Lock Rect (%p) = l %d, t %d, r %d, b %d\n", pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
+        TRACE("Lock Rect (%p) = l %ld, t %ld, r %ld, b %ld\n", pRect, pRect->left, pRect->top, pRect->right, pRect->bottom);
         pLockedRect->pBits = This->allocatedMemory + (pLockedRect->Pitch * pRect->top) + (pRect->left * This->bytesPerPixel);
     }
     TRACE("returning pBits=%p, pitch=%d\n", pLockedRect->pBits, pLockedRect->Pitch);
diff --git a/dlls/ddraw/dsurface/dib.c b/dlls/ddraw/dsurface/dib.c
index 61ec3c6..9025558 100644
--- a/dlls/ddraw/dsurface/dib.c
+++ b/dlls/ddraw/dsurface/dib.c
@@ -359,8 +359,8 @@
     TRACE("(%p)->(%p,%p,%p,%08lx,%p)\n", This,rdst,src,rsrc,dwFlags,lpbltfx);
 
     if (TRACE_ON(ddraw)) {
-	if (rdst) TRACE("\tdestrect :%dx%d-%dx%d\n",rdst->left,rdst->top,rdst->right,rdst->bottom);
-	if (rsrc) TRACE("\tsrcrect  :%dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
+	if (rdst) TRACE("\tdestrect :%ldx%ld-%ldx%ld\n",rdst->left,rdst->top,rdst->right,rdst->bottom);
+	if (rsrc) TRACE("\tsrcrect  :%ldx%ld-%ldx%ld\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
 	TRACE("\tflags: ");
 	DDRAW_dump_DDBLT(dwFlags);
 	if (dwFlags & DDBLT_DDFX) {
@@ -818,7 +818,7 @@
 	if (FIXME_ON(ddraw))
 	  DDRAW_dump_DDBLTFAST(trans);
 	if (rsrc)
-	  FIXME("\tsrcrect: %dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
+	  FIXME("\tsrcrect: %ldx%ld-%ldx%ld\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
 	else
 	  FIXME(" srcrect: NULL\n");
     }
diff --git a/dlls/ddraw/dsurface/fakezbuffer.c b/dlls/ddraw/dsurface/fakezbuffer.c
index 67e86c0..29744a2 100644
--- a/dlls/ddraw/dsurface/fakezbuffer.c
+++ b/dlls/ddraw/dsurface/fakezbuffer.c
@@ -121,8 +121,8 @@
 
     if (TRACE_ON(ddraw)) {
         TRACE("(%p)->(%p,%p,%p,%08lx,%p)\n", This,rdst,src,rsrc,dwFlags,lpbltfx);
-	if (rdst) TRACE("\tdestrect :%dx%d-%dx%d\n",rdst->left,rdst->top,rdst->right,rdst->bottom);
-	if (rsrc) TRACE("\tsrcrect  :%dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
+	if (rdst) TRACE("\tdestrect :%ldx%ld-%ldx%ld\n",rdst->left,rdst->top,rdst->right,rdst->bottom);
+	if (rsrc) TRACE("\tsrcrect  :%ldx%ld-%ldx%ld\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
 	TRACE("\tflags: ");
 	DDRAW_dump_DDBLT(dwFlags);
 	if (dwFlags & DDBLT_DDFX) {
@@ -162,7 +162,7 @@
 	if (FIXME_ON(ddraw))
 	  DDRAW_dump_DDBLTFAST(trans);
 	if (rsrc)
-	  FIXME("\tsrcrect: %dx%d-%dx%d\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
+	  FIXME("\tsrcrect: %ldx%ld-%ldx%ld\n",rsrc->left,rsrc->top,rsrc->right,rsrc->bottom);
 	else
 	  FIXME(" srcrect: NULL\n");
     }
diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c
index 2a8ee33..78dfaf7 100644
--- a/dlls/ddraw/dsurface/main.c
+++ b/dlls/ddraw/dsurface/main.c
@@ -1013,7 +1013,7 @@
     /* If asked only for a part, change the surface pointer.
      * (Not documented.) */
     if (prect != NULL) {
-	TRACE("	lprect: %dx%d-%dx%d\n",
+	TRACE("	lprect: %ldx%ld-%ldx%ld\n",
 		prect->top,prect->left,prect->bottom,prect->right
 	);
 	if ((prect->top < 0) ||
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index a916011..4e874a9 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -506,7 +506,7 @@
   TRACE("(%p)->(%p, (%ld,%ld), (%ld,%ld) <- (%ld,%ld), (%ld,%ld), %p)\n",
 	This, hdc, x, y, cx, cy, xSrc, ySrc, cxSrc, cySrc, prcWBounds);
   if(prcWBounds)
-    TRACE("prcWBounds (%d,%d) - (%d,%d)\n", prcWBounds->left, prcWBounds->top,
+    TRACE("prcWBounds (%ld,%ld) - (%ld,%ld)\n", prcWBounds->left, prcWBounds->top,
 	  prcWBounds->right, prcWBounds->bottom);
 
   /*
diff --git a/dlls/shell32/shlmenu.c b/dlls/shell32/shlmenu.c
index 6ddd6e7..45f95b5 100644
--- a/dlls/shell32/shlmenu.c
+++ b/dlls/shell32/shlmenu.c
@@ -618,7 +618,7 @@
 	Shell_GetImageList(0, &hImageList);
 	ImageList_Draw(hImageList, pMyItem->iIconIndex, lpdis->hDC, xi, yi, ILD_NORMAL);
 
-	TRACE("-- 0x%04x 0x%04x 0x%04x 0x%04x\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom);
+	TRACE("-- 0x%04lx 0x%04lx 0x%04lx 0x%04lx\n", TextRect.left, TextRect.top, TextRect.right, TextRect.bottom);
 
 	SetTextColor(lpdis->hDC, clrPrevText);
 	SetBkColor(lpdis->hDC, clrPrevBkgnd);
@@ -780,7 +780,7 @@
 	FIXME("%p 0x%08x\n", hMenu, uPos);
 
 	if (GetMenuItemRect(0, hMenu, uPos, &rect))
-	{ FIXME("0x%04x 0x%04x 0x%04x 0x%04x\n",
+	{ FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx\n",
 	  rect.right, rect.left, rect.top, rect.bottom);
 	  return ((rect.right-rect.left)<<16) + (rect.top-rect.bottom);
 	}
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 6a9bbb2..810a1b7 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -1658,7 +1658,7 @@
 
 
 	TRACE("(%p)->(shlview=%p set=%p shlbrs=%p rec=%p hwnd=%p) incomplete\n",This, lpPrevView,lpfs, psb, prcView, phWnd);
-	TRACE("-- vmode=%x flags=%x left=%i top=%i right=%i bottom=%i\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
+	TRACE("-- vmode=%x flags=%x left=%li top=%li right=%li bottom=%li\n",lpfs->ViewMode, lpfs->fFlags ,prcView->left,prcView->top, prcView->right, prcView->bottom);
 
 	/*set up the member variables*/
 	This->pShellBrowser = psb;
diff --git a/dlls/ttydrv/wnd.c b/dlls/ttydrv/wnd.c
index 2c23871..b62f0d4 100644
--- a/dlls/ttydrv/wnd.c
+++ b/dlls/ttydrv/wnd.c
@@ -456,7 +456,7 @@
     if (winpos->hwnd == GetDesktopWindow()) return FALSE;
     if (!(wndPtr = WIN_FindWndPtr( winpos->hwnd ))) return FALSE;
 
-    TRACE("\tcurrent (%i,%i)-(%i,%i), style %08x\n",
+    TRACE("\tcurrent (%ld,%ld)-(%ld,%ld), style %08x\n",
           wndPtr->rectWindow.left, wndPtr->rectWindow.top,
           wndPtr->rectWindow.right, wndPtr->rectWindow.bottom, (unsigned)wndPtr->dwStyle );
 
@@ -581,7 +581,7 @@
 
         SendMessageW( winpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)&params );
 
-        TRACE( "%d,%d-%d,%d\n", params.rgrc[0].left, params.rgrc[0].top,
+        TRACE( "%ld,%ld-%ld,%ld\n", params.rgrc[0].left, params.rgrc[0].top,
                params.rgrc[0].right, params.rgrc[0].bottom );
 
         /* If the application send back garbage, ignore it */
diff --git a/dlls/user/painting.c b/dlls/user/painting.c
index b39fd19..f652481 100644
--- a/dlls/user/painting.c
+++ b/dlls/user/painting.c
@@ -219,7 +219,7 @@
     IntersectRect(&lps->rcPaint, &clientRect, &clipRect);
     DPtoLP(lps->hdc, (LPPOINT)&lps->rcPaint, 2);  /* we must return LP */
 
-    TRACE("hdc = %p box = (%i,%i - %i,%i)\n",
+    TRACE("hdc = %p box = (%ld,%ld - %ld,%ld)\n",
           lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom );
 
     if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return 0;
diff --git a/dlls/user/tests/sysparams.c b/dlls/user/tests/sysparams.c
index 1d94832..9566db0 100644
--- a/dlls/user/tests/sysparams.c
+++ b/dlls/user/tests/sysparams.c
@@ -923,10 +923,10 @@
                            SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
     test_change_message( SPI_SETWORKAREA, "" );
     SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
-    eq( area.left,   curr_val.left,   "left",   "%d" );
-    eq( area.top,    curr_val.top,    "top",    "%d" );
-    eq( area.right,  curr_val.right,  "right",  "%d" );
-    eq( area.bottom, curr_val.bottom, "bottom", "%d" );
+    eq( area.left,   curr_val.left,   "left",   "%ld" );
+    eq( area.top,    curr_val.top,    "top",    "%ld" );
+    eq( area.right,  curr_val.right,  "right",  "%ld" );
+    eq( area.bottom, curr_val.bottom, "bottom", "%ld" );
 
     curr_val.left = 2;
     curr_val.top = 2;
@@ -936,10 +936,10 @@
                           SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
     test_change_message( SPI_SETWORKAREA, "" );
     SystemParametersInfoA( SPI_GETWORKAREA, 0, &area, 0 );
-    eq( area.left,   curr_val.left,   "left",   "%d" );
-    eq( area.top,    curr_val.top,    "top",    "%d" );
-    eq( area.right,  curr_val.right,  "right",  "%d" );
-    eq( area.bottom, curr_val.bottom, "bottom", "%d" );
+    eq( area.left,   curr_val.left,   "left",   "%ld" );
+    eq( area.top,    curr_val.top,    "top",    "%ld" );
+    eq( area.right,  curr_val.right,  "right",  "%ld" );
+    eq( area.bottom, curr_val.bottom, "bottom", "%ld" );
 
     SystemParametersInfoA(SPI_SETWORKAREA, 0, &old_area, SPIF_UPDATEINIFILE);
 }
diff --git a/dlls/user/text.c b/dlls/user/text.c
index 66b759a..04cbb91 100644
--- a/dlls/user/text.c
+++ b/dlls/user/text.c
@@ -846,7 +846,7 @@
     int prefix_offset;
     ellipsis_data ellip;
 
-    TRACE("%s, %d , [(%d,%d),(%d,%d)]\n", debugstr_wn (str, count), count,
+    TRACE("%s, %d , [(%ld,%ld),(%ld,%ld)]\n", debugstr_wn (str, count), count,
 	  rect->left, rect->top, rect->right, rect->bottom);
 
    if (dtp) TRACE("Params: iTabLength=%d, iLeftMargin=%d, iRightMargin=%d\n",
diff --git a/dlls/wineps/escape.c b/dlls/wineps/escape.c
index 8891de7..1598cda 100644
--- a/dlls/wineps/escape.c
+++ b/dlls/wineps/escape.c
@@ -79,7 +79,7 @@
             r->top    = 0;
             r->right  = physDev->horzRes;
             r->bottom = physDev->vertRes;
-            TRACE("NEXTBAND returning %d,%d - %d,%d\n", r->left, r->top, r->right, r->bottom );
+            TRACE("NEXTBAND returning %ld,%ld - %ld,%ld\n", r->left, r->top, r->right, r->bottom );
 	    return 1;
 	}
         r->left   = 0;
@@ -182,7 +182,7 @@
                 WARN("cbInput != sizeof(RECT) (=%d) for SET_BOUNDS\n", cbInput);
 		return 0;
             }
-	    TRACE("SET_BOUNDS (%d,%d) - (%d,%d)\n", r->left, r->top,
+	    TRACE("SET_BOUNDS (%ld,%ld) - (%ld,%ld)\n", r->left, r->top,
 		  r->right, r->bottom);
 	    return 0;
 	}
diff --git a/dlls/wineps/init.c b/dlls/wineps/init.c
index 5b8c000..9a422c4 100644
--- a/dlls/wineps/init.c
+++ b/dlls/wineps/init.c
@@ -222,7 +222,7 @@
 	physDev->PageSize.cy = 0;
     }
 
-    TRACE("ImageableArea = %d,%d - %d,%d: PageSize = %ldx%ld\n",
+    TRACE("ImageableArea = %ld,%ld - %ld,%ld: PageSize = %ldx%ld\n",
 	  physDev->ImageableArea.left, physDev->ImageableArea.bottom,
 	  physDev->ImageableArea.right, physDev->ImageableArea.top,
 	  physDev->PageSize.cx, physDev->PageSize.cy);
diff --git a/dlls/winmm/mciavi/wnd.c b/dlls/winmm/mciavi/wnd.c
index bfb4d39..04450bb 100644
--- a/dlls/winmm/mciavi/wnd.c
+++ b/dlls/winmm/mciavi/wnd.c
@@ -153,7 +153,7 @@
     if (dwFlags & MCI_DGV_PUT_WINDOW) {
 	strncat(buffer, "PUT_WINDOW", sizeof(buffer));
     }
-    TRACE("%s (%d,%d,%d,%d)\n", buffer, rc.left, rc.top, rc.right, rc.bottom);
+    TRACE("%s (%ld,%ld,%ld,%ld)\n", buffer, rc.left, rc.top, rc.right, rc.bottom);
 
     return 0;
 }
@@ -195,7 +195,7 @@
 	x = "Window";
 	GetClientRect(wma->hWnd, &lpParms->rc);
     }
-    TRACE("%s -> (%d,%d,%d,%d)\n",
+    TRACE("%s -> (%ld,%ld,%ld,%ld)\n",
 	  x, lpParms->rc.left, lpParms->rc.top, lpParms->rc.right, lpParms->rc.bottom);
 
     return 0;
diff --git a/dlls/x11drv/scroll.c b/dlls/x11drv/scroll.c
index 7591591..fadad47 100644
--- a/dlls/x11drv/scroll.c
+++ b/dlls/x11drv/scroll.c
@@ -48,9 +48,9 @@
     RECT rect, rClip, rDst;
 
     TRACE( "%p %d,%d hrgnUpdate=%p rcUpdate = %p\n", hdc, dx, dy, hrgnUpdate, rcUpdate );
-    if (clipRect) TRACE( "cliprc = (%d,%d,%d,%d)\n",
+    if (clipRect) TRACE( "cliprc = (%ld,%ld,%ld,%ld)\n",
                          clipRect->left, clipRect->top, clipRect->right, clipRect->bottom );
-    if (rc) TRACE( "rc = (%d,%d,%d,%d)\n", rc->left, rc->top, rc->right, rc->bottom );
+    if (rc) TRACE( "rc = (%ld,%ld,%ld,%ld)\n", rc->left, rc->top, rc->right, rc->bottom );
 
     /* compute device clipping region (in device coordinates) */
 
@@ -128,10 +128,10 @@
     HRGN  hrgnTemp;
     HDC   hDC;
 
-    TRACE( "%p, %d,%d hrgnUpdate=%p rcUpdate = %p rect=(%d,%d-%d,%d) %04x\n",
+    TRACE( "%p, %d,%d hrgnUpdate=%p rcUpdate = %p rect=(%ld,%ld-%ld,%ld) %04x\n",
            hwnd, dx, dy, hrgnUpdate, rcUpdate,
            rect->left, rect->top, rect->right, rect->bottom, flags );
-    TRACE( "clipRect = (%d,%d,%d,%d)\n",
+    TRACE( "clipRect = (%ld,%ld,%ld,%ld)\n",
            clipRect->left, clipRect->top, clipRect->right, clipRect->bottom );
 
     if( hrgnUpdate ) bOwnRgn = FALSE;
diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c
index 3c62db1..f80f909 100644
--- a/dlls/x11drv/window.c
+++ b/dlls/x11drv/window.c
@@ -536,7 +536,7 @@
 
     if (mask)
     {
-        TRACE( "setting win %lx pos %d,%d,%dx%d after %lx changes=%x\n",
+        TRACE( "setting win %lx pos %ld,%ld,%ldx%ld after %lx changes=%x\n",
                data->whole_window, whole_rect.left, whole_rect.top,
                whole_rect.right - whole_rect.left, whole_rect.bottom - whole_rect.top,
                changes.sibling, mask );
@@ -573,7 +573,7 @@
     {
         BOOL was_mapped = is_client_window_mapped( win );
 
-        TRACE( "setting win %lx pos %d,%d,%dx%d (was %d,%d,%dx%d) after %lx changes=%x\n",
+        TRACE( "setting win %lx pos %ld,%ld,%ldx%ld (was %ld,%ld,%ldx%ld) after %lx changes=%x\n",
                data->client_window, client_rect.left, client_rect.top,
                client_rect.right - client_rect.left, client_rect.bottom - client_rect.top,
                data->client_rect.left, data->client_rect.top,
@@ -954,7 +954,7 @@
     X11DRV_sync_client_window_position( display, wndPtr );
     X11DRV_register_window( display, hwnd, data );
 
-    TRACE( "win %p window %d,%d,%d,%d client %d,%d,%d,%d whole %d,%d,%d,%d X client %d,%d,%d,%d xwin %x/%x\n",
+    TRACE( "win %p window %ld,%ld,%ld,%ld client %ld,%ld,%ld,%ld whole %ld,%ld,%ld,%ld X client %ld,%ld,%ld,%ld xwin %x/%x\n",
            hwnd, wndPtr->rectWindow.left, wndPtr->rectWindow.top,
            wndPtr->rectWindow.right, wndPtr->rectWindow.bottom,
            wndPtr->rectClient.left, wndPtr->rectClient.top,
diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c
index 4e56530..e31d09c 100644
--- a/dlls/x11drv/winpos.c
+++ b/dlls/x11drv/winpos.c
@@ -607,7 +607,7 @@
 
         wvrFlags = SendMessageW( pWinpos->hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)&params );
 
-        TRACE( "%d,%d-%d,%d\n", params.rgrc[0].left, params.rgrc[0].top,
+        TRACE( "(%ld,%ld)-(%ld,%ld)\n", params.rgrc[0].left, params.rgrc[0].top,
                params.rgrc[0].right, params.rgrc[0].bottom );
 
         /* If the application send back garbage, ignore it */
@@ -904,7 +904,7 @@
 
     if (!(wndPtr = WIN_FindWndPtr( winpos->hwnd ))) return FALSE;
 
-    TRACE("\tcurrent (%i,%i)-(%i,%i), style %08x\n",
+    TRACE("\tcurrent (%ld,%ld)-(%ld,%ld), style %08x\n",
           wndPtr->rectWindow.left, wndPtr->rectWindow.top,
           wndPtr->rectWindow.right, wndPtr->rectWindow.bottom, (unsigned)wndPtr->dwStyle );
 
@@ -1554,7 +1554,7 @@
     rect.top    = y;
     rect.right  = x + event->width;
     rect.bottom = y + event->height;
-    TRACE( "win %p new X rect %d,%d,%dx%d (event %d,%d,%dx%d)\n",
+    TRACE( "win %p new X rect %ld,%ld,%ldx%ld (event %d,%d,%dx%d)\n",
            hwnd, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
            event->x, event->y, event->width, event->height );
     X11DRV_X_to_window_rect( win, &rect );
@@ -1589,7 +1589,7 @@
     GetWindowRect( hwnd, &rect );
     if (rect.left == winpos.x && rect.top == winpos.y) winpos.flags |= SWP_NOMOVE;
     else
-        TRACE( "%p moving from (%d,%d) to (%d,%d)\n",
+        TRACE( "%p moving from (%ld,%ld) to (%d,%d)\n",
                hwnd, rect.left, rect.top, winpos.x, winpos.y );
 
     if ((rect.right - rect.left == winpos.cx && rect.bottom - rect.top == winpos.cy) ||
@@ -1597,7 +1597,7 @@
         (IsRectEmpty( &rect ) && winpos.cx == 1 && winpos.cy == 1))
         winpos.flags |= SWP_NOSIZE;
     else
-        TRACE( "%p resizing from (%dx%d) to (%dx%d)\n",
+        TRACE( "%p resizing from (%ldx%ld) to (%dx%d)\n",
                hwnd, rect.right - rect.left, rect.bottom - rect.top,
                winpos.cx, winpos.cy );
 
diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c
index 1b7b33f..94a4006 100644
--- a/dlls/x11drv/xrender.c
+++ b/dlls/x11drv/xrender.c
@@ -930,7 +930,7 @@
     }
 
     if(lprect)
-      TRACE("rect: %d,%d - %d,%d\n", lprect->left, lprect->top, lprect->right,
+      TRACE("rect: %ld,%ld - %ld,%ld\n", lprect->left, lprect->top, lprect->right,
 	    lprect->bottom);
     TRACE("align = %x bkmode = %x mapmode = %x\n", dc->textAlign, GetBkMode(hdc), dc->MapMode);
 
@@ -1295,7 +1295,7 @@
 		    cur.y += entry->gis[glyphs[idx]].yOff;
 		}
 	    }
-	    TRACE("glyph extents %d,%d - %d,%d drawable x,y %ld,%ld\n", extents.left, extents.top,
+	    TRACE("glyph extents %ld,%ld - %ld,%ld drawable x,y %ld,%ld\n", extents.left, extents.top,
 		  extents.right, extents.bottom, physDev->org.x + x, physDev->org.y + y);
 
 	    if(physDev->org.x + x + extents.left >= 0) {
diff --git a/graphics/x11drv/bitblt.c b/graphics/x11drv/bitblt.c
index eabe213..4cb3889 100644
--- a/graphics/x11drv/bitblt.c
+++ b/graphics/x11drv/bitblt.c
@@ -1289,7 +1289,7 @@
                                       dcSrc, xSrc, ySrc, widthSrc, heightSrc,
                                       &visRectSrc, &visRectDst ))
             return TRUE;
-        TRACE("    vissrc=%d,%d-%d,%d visdst=%d,%d-%d,%d\n",
+        TRACE("    vissrc=%ld,%ld-%ld,%ld visdst=%ld,%ld-%ld,%ld\n",
                         visRectSrc.left, visRectSrc.top,
                         visRectSrc.right, visRectSrc.bottom,
                         visRectDst.left, visRectDst.top,
@@ -1301,7 +1301,7 @@
         if (!BITBLT_GetVisRectangles( dcDst, xDst, yDst, widthDst, heightDst,
                                       NULL, 0, 0, 0, 0, NULL, &visRectDst ))
             return TRUE;
-        TRACE("    vissrc=none visdst=%d,%d-%d,%d\n",
+        TRACE("    vissrc=none visdst=%ld,%ld-%ld,%ld\n",
                         visRectDst.left, visRectDst.top,
                         visRectDst.right, visRectDst.bottom );
     }
diff --git a/graphics/x11drv/text.c b/graphics/x11drv/text.c
index 9f0eccb..34e78c4 100644
--- a/graphics/x11drv/text.c
+++ b/graphics/x11drv/text.c
@@ -87,7 +87,7 @@
        terminating newlines seems ok.  MW, April 1998.  */
     if (count > 0 && wstr[count - 1] == '\n') count--;
 
-    if (lprect != NULL) TRACE("\trect=(%d,%d - %d,%d)\n",
+    if (lprect != NULL) TRACE("\trect=(%ld,%ld - %ld,%ld)\n",
                                      lprect->left, lprect->top,
                                      lprect->right, lprect->bottom );
       /* Setup coordinates */
@@ -128,7 +128,7 @@
     x = pt.x;
     y = pt.y;
 
-    TRACE("\treal coord: x=%i, y=%i, rect=(%d,%d - %d,%d)\n",
+    TRACE("\treal coord: x=%i, y=%i, rect=(%ld,%ld - %ld,%ld)\n",
 			  x, y, rect.left, rect.top, rect.right, rect.bottom);
 
       /* Draw the rectangle */
diff --git a/include/windef.h b/include/windef.h
index 4cba236..d63fe68 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -322,14 +322,13 @@
 /* The RECT structure */
 typedef struct tagRECT
 {
-    INT  left;
-    INT  top;
-    INT  right;
-    INT  bottom;
+    LONG left;
+    LONG top;
+    LONG right;
+    LONG bottom;
 } RECT, *PRECT, *LPRECT;
 typedef const RECT *LPCRECT;
 
-
 typedef struct tagRECTL
 {
     LONG left;
diff --git a/include/wine/debug.h b/include/wine/debug.h
index 769e066..5039668 100644
--- a/include/wine/debug.h
+++ b/include/wine/debug.h
@@ -146,7 +146,7 @@
 static inline const char *wine_dbgstr_rect( const RECT *rect )
 {
     if (!rect) return "(null)";
-    return wine_dbg_sprintf( "(%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom );
+    return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom );
 }
 
 #define WINE_TRACE                 __WINE_DPRINTF(_TRACE,__wine_dbch___default)
diff --git a/objects/clipping.c b/objects/clipping.c
index 780522e..6866cd9 100644
--- a/objects/clipping.c
+++ b/objects/clipping.c
@@ -367,7 +367,7 @@
     BOOL ret = FALSE;
     DC *dc = DC_GetDCUpdate( hdc );
     if (!dc) return FALSE;
-    TRACE("%p %d,%dx%d,%d\n", hdc, rect->left, rect->top, rect->right, rect->bottom );
+    TRACE("%p %ld,%ldx%ld,%ld\n", hdc, rect->left, rect->top, rect->right, rect->bottom );
     if (dc->hGCClipRgn)
     {
         POINT pt[2];
diff --git a/objects/enhmetafile.c b/objects/enhmetafile.c
index eaff93c..3d96fad 100644
--- a/objects/enhmetafile.c
+++ b/objects/enhmetafile.c
@@ -1637,7 +1637,7 @@
 
     if (hdc && (emh->rclFrame.right - emh->rclFrame.left) && (emh->rclFrame.bottom - emh->rclFrame.top))
     {
-        TRACE("rect: %d,%d - %d,%d. rclFrame: %ld,%ld - %ld,%ld\n",
+        TRACE("rect: %ld,%ld - %ld,%ld. rclFrame: %ld,%ld - %ld,%ld\n",
 	      lpRect->left, lpRect->top, lpRect->right, lpRect->bottom,
 	      emh->rclFrame.left, emh->rclFrame.top, emh->rclFrame.right,
 	      emh->rclFrame.bottom);
diff --git a/objects/region.c b/objects/region.c
index 3a4a144..0adf6f9 100644
--- a/objects/region.c
+++ b/objects/region.c
@@ -472,11 +472,11 @@
 {
     RECT *pRect, *pRectEnd = pReg->rects + pReg->numRects;
 
-    TRACE("Region %p: %d,%d - %d,%d %d rects\n", pReg,
+    TRACE("Region %p: %ld,%ld - %ld,%ld %d rects\n", pReg,
 	    pReg->extents.left, pReg->extents.top,
 	    pReg->extents.right, pReg->extents.bottom, pReg->numRects);
     for(pRect = pReg->rects; pRect < pRectEnd; pRect++)
-        TRACE("\t%d,%d - %d,%d\n", pRect->left, pRect->top,
+        TRACE("\t%ld,%ld - %ld,%ld\n", pRect->left, pRect->top,
 		       pRect->right, pRect->bottom);
     return;
 }
diff --git a/programs/winedbg/info.c b/programs/winedbg/info.c
index daa3e76..4e31e59 100644
--- a/programs/winedbg/info.c
+++ b/programs/winedbg/info.c
@@ -408,7 +408,7 @@
 		"next=%p  child=%p  parent=%p  owner=%p  class='%s'\n"
 		"inst=%p  active=%p  idmenu=%08lx\n"
 		"style=%08lx  exstyle=%08lx  wndproc=%08lx  text='%s'\n"
-		"client=%d,%d-%d,%d  window=%d,%d-%d,%d sysmenu=%p\n",
+		"client=%ld,%ld-%ld,%ld  window=%ld,%ld-%ld,%ld sysmenu=%p\n",
 		GetWindow(hWnd, GW_HWNDNEXT),
 		GetWindow(hWnd, GW_CHILD),
 		GetParent(hWnd),
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index c7af07d..fcaf33c 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -1122,7 +1122,7 @@
     part->u.text.color      = color;
     part->u.text.wUnderline = underline;
 
-    WINE_TRACE("Appended text '%*.*s'[%d] @ (%d,%d-%d,%d)\n",
+    WINE_TRACE("Appended text '%*.*s'[%d] @ (%ld,%ld-%ld,%ld)\n",
                part->u.text.wTextLen,
                part->u.text.wTextLen,
                part->u.text.lpsText,
@@ -1189,7 +1189,7 @@
     part->rect.bottom     = part->rect.top + gfxSize->cy;
     line->rect.bottom     = max(line->rect.bottom, part->rect.bottom);
 
-    WINE_TRACE("Appended gfx @ (%d,%d-%d,%d)\n",
+    WINE_TRACE("Appended gfx @ (%ld,%ld-%ld,%ld)\n",
                part->rect.left, part->rect.top, part->rect.right, part->rect.bottom);
 
     part->link = link;
diff --git a/windows/dce.c b/windows/dce.c
index 46909cd..2db3ea4 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -280,7 +280,7 @@
     {
 	DCE *dce;
 
-        TRACE("scope hwnd = %p, (%i,%i - %i,%i)\n",
+        TRACE("scope hwnd = %p, (%ld,%ld - %ld,%ld)\n",
               hwndScope, pRectUpdate->left,pRectUpdate->top,
               pRectUpdate->right,pRectUpdate->bottom);
 	if(TRACE_ON(dc))
diff --git a/windows/defwnd.c b/windows/defwnd.c
index 5950978..be2864c 100644
--- a/windows/defwnd.c
+++ b/windows/defwnd.c
@@ -439,7 +439,7 @@
                   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=(%i,%i - %i,%i)\n",
+                  TRACE("Painting class icon: vis rect=(%ld,%ld - %ld,%ld)\n",
                         ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right, ps.rcPaint.bottom );
                   DrawIcon( hdc, x, y, hIcon );
 	      }
diff --git a/windows/mdi.c b/windows/mdi.c
index afc2daa..c0b6655 100644
--- a/windows/mdi.c
+++ b/windows/mdi.c
@@ -650,7 +650,7 @@
     lpMinMax->ptMaxPosition.x = rect.left;
     lpMinMax->ptMaxPosition.y = rect.top;
 
-    TRACE("max rect (%i,%i - %i, %i)\n",
+    TRACE("max rect (%ld,%ld - %ld, %ld)\n",
                         rect.left,rect.top,rect.right,rect.bottom);
 }
 
diff --git a/windows/nonclient.c b/windows/nonclient.c
index dd55f98..88a1131 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -424,7 +424,7 @@
                 WS_EX_STATICEDGE | WS_EX_TOOLWINDOW);
     if (exStyle & WS_EX_DLGMODALFRAME) style &= ~WS_THICKFRAME;
 
-    TRACE("(%d,%d)-(%d,%d) %08lx %d %08lx\n",
+    TRACE("(%ld,%ld)-(%ld,%ld) %08lx %d %08lx\n",
           rect->left, rect->top, rect->right, rect->bottom,
           style, menu, exStyle );
 
@@ -469,7 +469,7 @@
 
         if (!(style & WS_CHILD) && GetMenu(hwnd))
         {
-            TRACE("Calling GetMenuBarHeight with hwnd %p, width %d, at (%d, %d).\n",
+            TRACE("Calling GetMenuBarHeight with hwnd %p, width %ld, at (%ld, %ld).\n",
                   hwnd, winRect->right - winRect->left, -tmpRect.left, -tmpRect.top );
 
 	    winRect->top +=
@@ -1598,13 +1598,13 @@
 	RECT r = rect;
 	r.bottom = rect.top + GetSystemMetrics(SM_CYMENU);
 
-	TRACE("Calling DrawMenuBar with rect (%d, %d)-(%d, %d)\n",
+	TRACE("Calling DrawMenuBar with rect (%ld, %ld)-(%ld, %ld)\n",
               r.left, r.top, r.right, r.bottom);
 
 	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 (%ld, %ld)-(%ld, %ld).\n",
           rect.left, rect.top, rect.right, rect.bottom );
 
     if (dwExStyle & WS_EX_CLIENTEDGE)
diff --git a/windows/painting.c b/windows/painting.c
index aa3600b..d056a76 100644
--- a/windows/painting.c
+++ b/windows/painting.c
@@ -243,7 +243,7 @@
 	    wnd->flags &= ~WIN_NEEDS_NCPAINT;
 	    GETCLIENTRECTW( wnd, r );
 
-	    TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %p\n",
+	    TRACE_(nonclient)( "\tclient box (%ld,%ld-%ld,%ld), hrgnUpdate %p\n",
 				r.left, r.top, r.right, r.bottom, wnd->hrgnUpdate );
 	    if( wnd->hrgnUpdate > (HRGN)1 )
 	    {
@@ -731,7 +731,7 @@
 	if( hrgnUpdate )
 	{
 	    GetRgnBox( hrgnUpdate, &r );
-            TRACE( "%p (%p) NULL %p box (%i,%i-%i,%i) flags=%04x\n",
+            TRACE( "%p (%p) NULL %p box (%ld,%ld-%ld,%ld) flags=%04x\n",
 	          hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags );
 	}
 	else
@@ -740,7 +740,7 @@
 		r = *rectUpdate;
 	    else
 		SetRectEmpty( &r );
-	    TRACE( "%p (%p) %s %d,%d-%d,%d %p flags=%04x\n",
+	    TRACE( "%p (%p) %s %ld,%ld-%ld,%ld %p flags=%04x\n",
                    hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left,
                    r.top, r.right, r.bottom, hrgnUpdate, flags );
 	}
diff --git a/windows/spy.c b/windows/spy.c
index 9ab66a4..9dcfb58 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -2106,7 +2106,7 @@
 	    {
 		LPRECT rc = (LPRECT) sp_e->lParam;
 		if (rc) {
-		    TRACE("lParam rect (%d,%d)-(%d,%d)\n",
+		    TRACE("lParam rect (%ld,%ld)-(%ld,%ld)\n",
 			  rc->left, rc->top, rc->right, rc->bottom);
 		}
 		break;
@@ -2149,7 +2149,7 @@
 		      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",
+		TRACE("hWnd=%p hDC=%p (%ld,%ld)-(%ld,%ld) itemData=0x%08lx\n",
 		      lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left,
 		      lpdis->rcItem.top, lpdis->rcItem.right,
 		      lpdis->rcItem.bottom, lpdis->itemData);
@@ -2187,7 +2187,7 @@
 	case WM_NCCALCSIZE:
 	    {
 		RECT *rc = (RECT *)sp_e->lParam;
-		TRACE("Rect (%d,%d)-(%d,%d)\n",
+		TRACE("Rect (%ld,%ld)-(%ld,%ld)\n",
 		      rc->left, rc->top, rc->right, rc->bottom);
 	    }
 	    break;
diff --git a/windows/sysparams.c b/windows/sysparams.c
index 902b6df..02fe681 100644
--- a/windows/sysparams.c
+++ b/windows/sysparams.c
@@ -1244,7 +1244,7 @@
         RECT *pr = (RECT *) pvParam;
 
         spi_idx = SPI_SETWORKAREA_IDX;
-        sprintf(buf, "%d %d %d %d",
+        sprintf(buf, "%ld %ld %ld %ld",
                 pr->left, pr->top,
                 pr->right, pr->bottom );
 
@@ -1274,7 +1274,7 @@
                               SPI_SETWORKAREA_VALNAME,
                               buf ))
           {
-              sscanf( buf, "%d %d %d %d",
+              sscanf( buf, "%ld %ld %ld %ld",
                       &work_area.left, &work_area.top,
                       &work_area.right, &work_area.bottom );
           }
diff --git a/windows/win.c b/windows/win.c
index c900f79..1855345 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -576,7 +576,7 @@
         win->rectWindow = *rectWindow;
         win->rectClient = *rectClient;
 
-        TRACE( "win %p window (%d,%d)-(%d,%d) client (%d,%d)-(%d,%d)\n", hwnd,
+        TRACE( "win %p window (%ld,%ld)-(%ld,%ld) client (%ld,%ld)-(%ld,%ld)\n", hwnd,
                rectWindow->left, rectWindow->top, rectWindow->right, rectWindow->bottom,
                rectClient->left, rectClient->top, rectClient->right, rectClient->bottom );
     }
diff --git a/windows/winpos.c b/windows/winpos.c
index 7884708..751bbf6 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -158,7 +158,7 @@
     if (ret)
     {
         MapWindowPoints( GetAncestor( hwnd, GA_PARENT ), 0, (POINT *)rect, 2 );
-        TRACE( "hwnd %p (%d,%d)-(%d,%d)\n",
+        TRACE( "hwnd %p (%ld,%ld)-(%ld,%ld)\n",
                hwnd, rect->left, rect->top, rect->right, rect->bottom);
     }
     return ret;