[PATCH] comctl32: Fix long types warnings in traces.

Nikolay Sivov nsivov at codeweavers.com
Mon Feb 7 00:07:55 CST 2022


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/comctl32/Makefile.in    |   2 +-
 dlls/comctl32/animate.c      |  80 ++++++++++----------
 dlls/comctl32/combo.c        |   6 +-
 dlls/comctl32/comboex.c      |  74 +++++++++---------
 dlls/comctl32/commctrl.c     |  53 ++++++-------
 dlls/comctl32/datetime.c     |  19 ++---
 dlls/comctl32/dpa.c          |  16 ++--
 dlls/comctl32/draglist.c     |   3 +-
 dlls/comctl32/edit.c         |  16 ++--
 dlls/comctl32/flatsb.c       |   7 +-
 dlls/comctl32/header.c       |   9 +--
 dlls/comctl32/hotkey.c       |  11 +--
 dlls/comctl32/imagelist.c    |  33 ++++----
 dlls/comctl32/ipaddress.c    |   6 +-
 dlls/comctl32/listbox.c      |   5 +-
 dlls/comctl32/listview.c     |  70 ++++++++---------
 dlls/comctl32/monthcal.c     |  27 +++----
 dlls/comctl32/nativefont.c   |   6 +-
 dlls/comctl32/pager.c        |  13 ++--
 dlls/comctl32/progress.c     |   6 +-
 dlls/comctl32/propsheet.c    |  30 ++++----
 dlls/comctl32/rebar.c        |  70 ++++++++---------
 dlls/comctl32/smoothscroll.c |   4 +-
 dlls/comctl32/static.c       |   4 +-
 dlls/comctl32/status.c       |  12 +--
 dlls/comctl32/syslink.c      |   4 +-
 dlls/comctl32/tab.c          |  38 ++++------
 dlls/comctl32/taskdialog.c   |   2 +-
 dlls/comctl32/toolbar.c      | 143 +++++++++++++++--------------------
 dlls/comctl32/tooltips.c     |  26 +++----
 dlls/comctl32/trackbar.c     |  11 ++-
 dlls/comctl32/treeview.c     |  40 +++++-----
 dlls/comctl32/updown.c       |   9 +--
 33 files changed, 401 insertions(+), 454 deletions(-)

diff --git a/dlls/comctl32/Makefile.in b/dlls/comctl32/Makefile.in
index 6c27e4c628a..c0272f2d7d4 100644
--- a/dlls/comctl32/Makefile.in
+++ b/dlls/comctl32/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES -D_COMCTL32_
+EXTRADEFS = -D_COMCTL32_
 MODULE    = comctl32.dll
 IMPORTLIB = comctl32
 IMPORTS   = uuid user32 gdi32 advapi32 usp10 imm32 kernelbase
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c
index f7ac28ae4c1..fff963a6baa 100644
--- a/dlls/comctl32/animate.c
+++ b/dlls/comctl32/animate.c
@@ -508,16 +508,16 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
 
     mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->mah, sizeof(infoPtr->mah));
 
-    TRACE("mah.dwMicroSecPerFrame=%d\n", 	infoPtr->mah.dwMicroSecPerFrame);
-    TRACE("mah.dwMaxBytesPerSec=%d\n",		infoPtr->mah.dwMaxBytesPerSec);
-    TRACE("mah.dwPaddingGranularity=%d\n", 	infoPtr->mah.dwPaddingGranularity);
-    TRACE("mah.dwFlags=%d\n",			infoPtr->mah.dwFlags);
-    TRACE("mah.dwTotalFrames=%d\n",		infoPtr->mah.dwTotalFrames);
-    TRACE("mah.dwInitialFrames=%d\n",		infoPtr->mah.dwInitialFrames);
-    TRACE("mah.dwStreams=%d\n",			infoPtr->mah.dwStreams);
-    TRACE("mah.dwSuggestedBufferSize=%d\n",	infoPtr->mah.dwSuggestedBufferSize);
-    TRACE("mah.dwWidth=%d\n",			infoPtr->mah.dwWidth);
-    TRACE("mah.dwHeight=%d\n",			infoPtr->mah.dwHeight);
+    TRACE("mah.dwMicroSecPerFrame=%ld\n", 	infoPtr->mah.dwMicroSecPerFrame);
+    TRACE("mah.dwMaxBytesPerSec=%ld\n",		infoPtr->mah.dwMaxBytesPerSec);
+    TRACE("mah.dwPaddingGranularity=%ld\n", 	infoPtr->mah.dwPaddingGranularity);
+    TRACE("mah.dwFlags=%ld\n",			infoPtr->mah.dwFlags);
+    TRACE("mah.dwTotalFrames=%ld\n",		infoPtr->mah.dwTotalFrames);
+    TRACE("mah.dwInitialFrames=%ld\n",		infoPtr->mah.dwInitialFrames);
+    TRACE("mah.dwStreams=%ld\n",		infoPtr->mah.dwStreams);
+    TRACE("mah.dwSuggestedBufferSize=%ld\n",	infoPtr->mah.dwSuggestedBufferSize);
+    TRACE("mah.dwWidth=%ld\n",			infoPtr->mah.dwWidth);
+    TRACE("mah.dwHeight=%ld\n",			infoPtr->mah.dwHeight);
 
     mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
 
@@ -543,17 +543,17 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
 	                                        HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
 	                                        LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
 	                                        HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
-    TRACE("ash.dwFlags=%d\n", 			infoPtr->ash.dwFlags);
+    TRACE("ash.dwFlags=%ld\n", 			infoPtr->ash.dwFlags);
     TRACE("ash.wPriority=%d\n", 		infoPtr->ash.wPriority);
     TRACE("ash.wLanguage=%d\n", 		infoPtr->ash.wLanguage);
-    TRACE("ash.dwInitialFrames=%d\n", 		infoPtr->ash.dwInitialFrames);
-    TRACE("ash.dwScale=%d\n", 			infoPtr->ash.dwScale);
-    TRACE("ash.dwRate=%d\n", 			infoPtr->ash.dwRate);
-    TRACE("ash.dwStart=%d\n", 			infoPtr->ash.dwStart);
-    TRACE("ash.dwLength=%d\n",			infoPtr->ash.dwLength);
-    TRACE("ash.dwSuggestedBufferSize=%d\n", 	infoPtr->ash.dwSuggestedBufferSize);
-    TRACE("ash.dwQuality=%d\n", 		infoPtr->ash.dwQuality);
-    TRACE("ash.dwSampleSize=%d\n", 		infoPtr->ash.dwSampleSize);
+    TRACE("ash.dwInitialFrames=%ld\n", 		infoPtr->ash.dwInitialFrames);
+    TRACE("ash.dwScale=%ld\n", 			infoPtr->ash.dwScale);
+    TRACE("ash.dwRate=%ld\n", 			infoPtr->ash.dwRate);
+    TRACE("ash.dwStart=%ld\n", 			infoPtr->ash.dwStart);
+    TRACE("ash.dwLength=%lu\n",			infoPtr->ash.dwLength);
+    TRACE("ash.dwSuggestedBufferSize=%lu\n", 	infoPtr->ash.dwSuggestedBufferSize);
+    TRACE("ash.dwQuality=%lu\n", 		infoPtr->ash.dwQuality);
+    TRACE("ash.dwSampleSize=%lu\n", 		infoPtr->ash.dwSampleSize);
     TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", 	infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
 	  infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
 
@@ -573,17 +573,17 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
 
     mmioRead(infoPtr->hMMio, (LPSTR)infoPtr->inbih, mmckInfo.cksize);
 
-    TRACE("bih.biSize=%d\n", 		infoPtr->inbih->biSize);
-    TRACE("bih.biWidth=%d\n", 		infoPtr->inbih->biWidth);
-    TRACE("bih.biHeight=%d\n",		infoPtr->inbih->biHeight);
+    TRACE("bih.biSize=%lu\n", 		infoPtr->inbih->biSize);
+    TRACE("bih.biWidth=%ld\n", 		infoPtr->inbih->biWidth);
+    TRACE("bih.biHeight=%ld\n",		infoPtr->inbih->biHeight);
     TRACE("bih.biPlanes=%d\n", 		infoPtr->inbih->biPlanes);
     TRACE("bih.biBitCount=%d\n", 	infoPtr->inbih->biBitCount);
-    TRACE("bih.biCompression=%d\n", 	infoPtr->inbih->biCompression);
-    TRACE("bih.biSizeImage=%d\n", 	infoPtr->inbih->biSizeImage);
-    TRACE("bih.biXPelsPerMeter=%d\n", 	infoPtr->inbih->biXPelsPerMeter);
-    TRACE("bih.biYPelsPerMeter=%d\n", 	infoPtr->inbih->biYPelsPerMeter);
-    TRACE("bih.biClrUsed=%d\n", 	infoPtr->inbih->biClrUsed);
-    TRACE("bih.biClrImportant=%d\n", 	infoPtr->inbih->biClrImportant);
+    TRACE("bih.biCompression=%lu\n", 	infoPtr->inbih->biCompression);
+    TRACE("bih.biSizeImage=%lu\n", 	infoPtr->inbih->biSizeImage);
+    TRACE("bih.biXPelsPerMeter=%lu\n", 	infoPtr->inbih->biXPelsPerMeter);
+    TRACE("bih.biYPelsPerMeter=%lu\n", 	infoPtr->inbih->biYPelsPerMeter);
+    TRACE("bih.biClrUsed=%lu\n", 	infoPtr->inbih->biClrUsed);
+    TRACE("bih.biClrImportant=%lu\n", 	infoPtr->inbih->biClrImportant);
 
     mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
 
@@ -625,13 +625,15 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
 	numFrame++;
 	mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
     }
-    if (numFrame != infoPtr->mah.dwTotalFrames) {
-	WARN("Found %d frames (/%d)\n", numFrame, infoPtr->mah.dwTotalFrames);
-	return FALSE;
+    if (numFrame != infoPtr->mah.dwTotalFrames)
+    {
+        WARN("Found %lu frames (/%lu)\n", numFrame, infoPtr->mah.dwTotalFrames);
+        return FALSE;
     }
-    if (insize > infoPtr->ash.dwSuggestedBufferSize) {
-	WARN("insize=%d suggestedSize=%d\n", insize, infoPtr->ash.dwSuggestedBufferSize);
-	infoPtr->ash.dwSuggestedBufferSize = insize;
+    if (insize > infoPtr->ash.dwSuggestedBufferSize)
+    {
+        WARN("insize %lu suggestedSize %lu\n", insize, infoPtr->ash.dwSuggestedBufferSize);
+        infoPtr->ash.dwSuggestedBufferSize = insize;
     }
 
     infoPtr->indata = heap_alloc_zero(infoPtr->ash.dwSuggestedBufferSize);
@@ -818,7 +820,7 @@ static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs)
     infoPtr->hbmPrevFrame = 0;
     infoPtr->dwStyle = lpcs->style;
 
-    TRACE("Animate style=0x%08x, parent=%p\n", infoPtr->dwStyle, infoPtr->hwndNotify);
+    TRACE("Animate style %#lx, parent %p\n", infoPtr->dwStyle, infoPtr->hwndNotify);
 
     InitializeCriticalSection(&infoPtr->cs);
     infoPtr->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ANIMATE_INFO*->cs");
@@ -859,8 +861,7 @@ static BOOL ANIMATE_EraseBackground(ANIMATE_INFO const *infoPtr, HDC hdc)
 
 static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("%#Ix, styleOld %#lx, styleNew %#lx.\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
   
@@ -875,7 +876,8 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
 {
     ANIMATE_INFO *infoPtr = (ANIMATE_INFO *)GetWindowLongPtrW(hWnd, 0);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hWnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %#Ix, lparam %#Ix.\n", hWnd, uMsg, wParam, lParam);
+
     if (!infoPtr && (uMsg != WM_NCCREATE))
 	return DefWindowProcW(hWnd, uMsg, wParam, lParam);
     switch (uMsg)
@@ -953,7 +955,7 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
 
     default:
 	if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-	    ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+	    ERR("unknown msg %#x, wp %#Ix, lp %#Ix.\n", uMsg, wParam, lParam);
 
 	return DefWindowProcW(hWnd, uMsg, wParam, lParam);
     }
diff --git a/dlls/comctl32/combo.c b/dlls/comctl32/combo.c
index 2f3652c64bd..5876c2acbb8 100644
--- a/dlls/comctl32/combo.c
+++ b/dlls/comctl32/combo.c
@@ -1411,7 +1411,7 @@ static void COMBO_Size( HEADCOMBO *lphc )
      */
     if( curComboHeight > newComboHeight )
     {
-      TRACE("oldComboHeight=%d, newComboHeight=%d, oldDropBottom=%d, oldDropTop=%d\n",
+      TRACE("oldComboHeight=%d, newComboHeight=%d, oldDropBottom=%ld, oldDropTop=%ld\n",
             curComboHeight, newComboHeight, lphc->droppedRect.bottom,
             lphc->droppedRect.top);
       lphc->droppedRect.bottom = lphc->droppedRect.top + curComboHeight - newComboHeight;
@@ -1663,7 +1663,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam
     HEADCOMBO *lphc = (HEADCOMBO *)GetWindowLongPtrW( hwnd, 0 );
     HTHEME theme;
 
-    TRACE("[%p]: msg %#x wp %08lx lp %08lx\n", hwnd, message, wParam, lParam );
+    TRACE("[%p]: msg %#x, wp %Ix, lp %Ix\n", hwnd, message, wParam, lParam );
 
     if (!IsWindow(hwnd)) return 0;
 
@@ -2108,7 +2108,7 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam
 
     default:
         if (message >= WM_USER)
-            WARN("unknown msg WM_USER+%04x wp=%04lx lp=%08lx\n", message - WM_USER, wParam, lParam );
+            WARN("unknown msg WM_USER+%04x, wp %Ix, lp %Ix\n", message - WM_USER, wParam, lParam );
         break;
     }
 
diff --git a/dlls/comctl32/comboex.c b/dlls/comctl32/comboex.c
index 0f7e46949e4..5dc6b8d4ca0 100644
--- a/dlls/comctl32/comboex.c
+++ b/dlls/comctl32/comboex.c
@@ -140,7 +140,7 @@ static void COMBOEX_DumpItem (CBE_ITEMDATA const *item)
 {
     TRACE("item %p - mask=%08x, pszText=%p, cchTM=%d, iImage=%d\n",
           item, item->mask, item->pszText, item->cchTextMax, item->iImage);
-    TRACE("item %p - iSelectedImage=%d, iOverlay=%d, iIndent=%d, lParam=%08lx\n",
+    TRACE("item %p - iSelectedImage=%d, iOverlay=%d, iIndent=%d, lParam=%Ix\n",
           item, item->iSelectedImage, item->iOverlay, item->iIndent, item->lParam);
     if (item->mask & CBEIF_TEXT)
         TRACE("item %p - pszText=%s\n", item, debugstr_txt(item->pszText));
@@ -149,12 +149,12 @@ static void COMBOEX_DumpItem (CBE_ITEMDATA const *item)
 
 static void COMBOEX_DumpInput (COMBOBOXEXITEMW const *input)
 {
-    TRACE("input - mask=%08x, iItem=%ld, pszText=%p, cchTM=%d, iImage=%d\n",
+    TRACE("input - mask=%08x, iItem=%Id, pszText=%p, cchTM=%d, iImage=%d\n",
           input->mask, input->iItem, input->pszText, input->cchTextMax,
           input->iImage);
     if (input->mask & CBEIF_TEXT)
         TRACE("input - pszText=<%s>\n", debugstr_txt(input->pszText));
-    TRACE("input - iSelectedImage=%d, iOverlay=%d, iIndent=%d, lParam=%08lx\n",
+    TRACE("input - iSelectedImage=%d, iOverlay=%d, iIndent=%d, lParam=%Ix\n",
           input->iSelectedImage, input->iOverlay, input->iIndent, input->lParam);
 }
 
@@ -336,7 +336,7 @@ static void COMBOEX_GetComboFontSize (const COMBOEX_INFO *infoPtr, SIZE *size)
     GetTextExtentPointW (mydc, L"A", 1, size);
     SelectObject (mydc, ofont);
     ReleaseDC (0, mydc);
-    TRACE("selected font hwnd=%p, height=%d\n", nfont, size->cy);
+    TRACE("selected font hwnd %p, height %ld\n", nfont, size->cy);
 }
 
 
@@ -390,7 +390,7 @@ static void COMBOEX_AdjustEditPos (const COMBOEX_INFO *infoPtr)
 
     /* reposition the Edit control based on whether icon exists */
     COMBOEX_GetComboFontSize (infoPtr, &mysize);
-    TRACE("Combo font x=%d, y=%d\n", mysize.cx, mysize.cy);
+    TRACE("Combo font x %ld, y %ld\n", mysize.cx, mysize.cy);
     x = xioff + CBE_STARTOFFSET + 1;
     w = rect.right-rect.left - x - GetSystemMetrics(SM_CXVSCROLL) - 1;
     h = mysize.cy + 1;
@@ -413,7 +413,7 @@ static void COMBOEX_ReSize (const COMBOEX_INFO *infoPtr)
     cy = mysize.cy + CBE_EXTRA;
     if (infoPtr->himl && ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo)) {
 	cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy);
-	TRACE("upgraded height due to image:  height=%d\n", cy);
+	TRACE("upgraded height due to image: height %ld\n", cy);
     }
     SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, -1, cy);
     if (infoPtr->hwndCombo) {
@@ -509,7 +509,7 @@ static UINT COMBOEX_GetListboxText(COMBOEX_INFO *infoPtr, INT_PTR n, LPWSTR buf)
 
 static INT COMBOEX_DeleteItem (COMBOEX_INFO *infoPtr, INT_PTR index)
 {
-    TRACE("(index=%ld)\n", index);
+    TRACE("index %Id\n", index);
 
     /* if item number requested does not exist then return failure */
     if ((index >= infoPtr->nb_items) || (index < 0)) return CB_ERR;
@@ -696,7 +696,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
 {
     DWORD dwTemp;
 
-    TRACE("(mask=x%08x, style=0x%08x)\n", mask, style);
+    TRACE("mask %#lx, style %#lx\n", mask, style);
 
     dwTemp = infoPtr->dwExtStyle;
 
@@ -714,8 +714,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
     mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;
     if ((infoPtr->dwExtStyle & mask) != (dwTemp & mask)) {
 	/* if state of EX_NOEDITIMAGE changes, invalidate all */
-	TRACE("EX_NOEDITIMAGE state changed to %d\n",
-	      infoPtr->dwExtStyle & CBES_EX_NOEDITIMAGE);
+	TRACE("EX_NOEDITIMAGE state changed to %#lx\n", infoPtr->dwExtStyle & CBES_EX_NOEDITIMAGE);
 	InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
 	COMBOEX_AdjustEditPos (infoPtr);
 	if (infoPtr->hwndEdit)
@@ -865,10 +864,10 @@ static DWORD_PTR COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT_PTR index)
 	    return CB_ERR;
 	}
 	if (item1->mask & CBEIF_LPARAM) ret = item1->lParam;
-	TRACE("returning 0x%08lx\n", ret);
+	TRACE("returning %#Ix\n", ret);
     } else {
         ret = (DWORD_PTR)item1;
-        TRACE("non-valid result from combo, returning 0x%08lx\n", ret);
+        TRACE("non-valid result from combo, returning %#Ix\n", ret);
     }
     return ret;
 }
@@ -882,7 +881,7 @@ static INT COMBOEX_SetCursel (COMBOEX_INFO *infoPtr, INT_PTR index)
     if (!(item = COMBOEX_FindItem(infoPtr, index)))
 	return SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, index, 0);
 
-    TRACE("selecting item %ld text=%s\n", index, debugstr_txt(item->pszText));
+    TRACE("selecting item %Id text=%s\n", index, debugstr_txt(item->pszText));
     infoPtr->selected = index;
 
     sel = (INT)SendMessageW (infoPtr->hwndCombo, CB_SETCURSEL, index, 0);
@@ -905,7 +904,7 @@ static DWORD_PTR COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT_PTR index, DWOR
 	}
 	item1->mask |= CBEIF_LPARAM;
 	item1->lParam = data;
-	TRACE("setting lparam to 0x%08lx\n", data);
+	TRACE("setting lparam to %#Ix\n", data);
 	return 0;
     }
     TRACE("non-valid result from combo %p\n", item1);
@@ -932,7 +931,7 @@ static INT COMBOEX_SetItemHeight (COMBOEX_INFO const *infoPtr, INT index, UINT h
              - (cbx_crect.bottom-cbx_crect.top);
     TRACE("EX window=(%s), client=(%s)\n",
           wine_dbgstr_rect(&cbx_wrect), wine_dbgstr_rect(&cbx_crect));
-    TRACE("CB window=(%s), EX setting=(0,0)-(%d,%d)\n",
+    TRACE("CB window=(%s), EX setting=(0,0)-(%ld,%d)\n",
           wine_dbgstr_rect(&cbx_wrect), cbx_wrect.right-cbx_wrect.left, height);
     SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0,
 		  cbx_wrect.right-cbx_wrect.left, height,
@@ -1157,7 +1156,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam)
 	 */
 	oldItem = SendMessageW (infoPtr->hwndCombo, CB_GETCURSEL, 0, 0);
 	if (!(item = COMBOEX_FindItem(infoPtr, oldItem))) {
-	    ERR("item %ld not found. Problem!\n", oldItem);
+	    ERR("item %Id not found. Problem!\n", oldItem);
 	    break;
 	}
 	infoPtr->selected = oldItem;
@@ -1212,7 +1211,7 @@ static BOOL COMBOEX_WM_DeleteItem (COMBOEX_INFO *infoPtr, DELETEITEMSTRUCT const
     NMCOMBOBOXEXW nmcit;
     UINT i;
 
-    TRACE("CtlType=%08x, CtlID=%08x, itemID=%08x, hwnd=%p, data=%08lx\n",
+    TRACE("CtlType=%08x, CtlID=%08x, itemID=%08x, hwnd=%p, data=%Ix\n",
 	  dis->CtlType, dis->CtlID, dis->itemID, dis->hwndItem, dis->itemData);
 
     if (dis->itemID >= infoPtr->nb_items) return FALSE;
@@ -1268,7 +1267,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di
 	  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 (%s) itemData=0x%08lx\n",
+    TRACE("hWnd=%p hDC=%p (%s) itemData=%#Ix\n",
           dis->hwndItem, dis->hDC, wine_dbgstr_rect(&dis->rcItem), dis->itemData);
 
     /* MSDN says:                                                       */
@@ -1556,10 +1555,10 @@ static LRESULT COMBOEX_NCCreate (HWND hwnd)
 
     oldstyle = (DWORD)GetWindowLongW (hwnd, GWL_STYLE);
     newstyle = oldstyle & ~(WS_VSCROLL | WS_HSCROLL | WS_BORDER);
-    if (newstyle != oldstyle) {
-	TRACE("req style %08x, resetting style %08x\n",
-	      oldstyle, newstyle);
-	SetWindowLongW (hwnd, GWL_STYLE, newstyle);
+    if (newstyle != oldstyle)
+    {
+        TRACE("req style %#lx, resetting style %#lx\n", oldstyle, newstyle);
+        SetWindowLongW (hwnd, GWL_STYLE, newstyle);
     }
     return 1;
 }
@@ -1623,7 +1622,7 @@ static LRESULT COMBOEX_WindowPosChanging (const COMBOEX_INFO *infoPtr, WINDOWPOS
 	  wp->x, wp->y, wp->cx, wp->cy, wp->flags);
     TRACE("EX window=(%s), client=(%s)\n",
           wine_dbgstr_rect(&cbx_wrect), wine_dbgstr_rect(&cbx_crect));
-    TRACE("CB window=(%s), EX setting=(0,0)-(%d,%d)\n",
+    TRACE("CB window=(%s), EX setting=(0,0)-(%d,%ld)\n",
           wine_dbgstr_rect(&cbx_wrect), width, cb_wrect.bottom-cb_wrect.top);
 
     if (width) SetWindowPos (infoPtr->hwndCombo, HWND_TOP, 0, 0,
@@ -1658,8 +1657,8 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
     RECT rect;
     LRESULT lret;
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n",
-	  hwnd, uMsg, wParam, lParam, infoPtr);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lParam %Ix, info_ptr=%p\n",
+            hwnd, uMsg, wParam, lParam, infoPtr);
 
     if (uMsg == WM_NCDESTROY)
         RemoveWindowSubclass(hwnd, COMBOEX_EditWndProc, EDIT_SUBCLASSID);
@@ -1706,7 +1705,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
 		oldItem = SendMessageW (infoPtr->hwndCombo, CB_GETCURSEL, 0, 0);
 		InvalidateRect (infoPtr->hwndCombo, 0, 0);
 		if (!(item = COMBOEX_FindItem(infoPtr, oldItem))) {
-		    ERR("item %ld not found. Problem!\n", oldItem);
+		    ERR("item %Id not found. Problem!\n", oldItem);
 		    break;
 		}
 		infoPtr->selected = oldItem;
@@ -1727,10 +1726,8 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
 		if (selected != -1) {
                     cmp_func_t cmptext = get_cmp_func(infoPtr);
 		    item = COMBOEX_FindItem (infoPtr, selected);
-		    TRACE("handling VK_RETURN, selected = %ld, selected_text=%s\n",
-			  selected, debugstr_txt(item->pszText));
-		    TRACE("handling VK_RETURN, edittext=%s\n",
-			  debugstr_w(edit_text));
+		    TRACE("handling VK_RETURN, selected = %Id, selected_text=%s\n", selected, debugstr_txt(item->pszText));
+		    TRACE("handling VK_RETURN, edittext=%s\n", debugstr_w(edit_text));
 		    if (cmptext (COMBOEX_GetText(infoPtr, item), edit_text)) {
 			/* strings not equal -- indicate edit has changed */
 			selected = -1;
@@ -1817,8 +1814,8 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
     POINT pt;
     WCHAR edit_text[260];
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n",
-	  hwnd, uMsg, wParam, lParam, infoPtr);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lParam %Ix, info_ptr %p\n",
+            hwnd, uMsg, wParam, lParam, infoPtr);
 
     if (uMsg == WM_NCDESTROY)
         RemoveWindowSubclass(hwnd, COMBOEX_ComboWndProc, COMBO_SUBCLASSID);
@@ -1953,8 +1950,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
 		    lastwrk = COMBOEX_GetText(infoPtr, item);
 		}
 
-		TRACE("handling EN_CHANGE, selected = %ld, selected_text=%s\n",
-		      selected, debugstr_w(lastwrk));
+		TRACE("handling EN_CHANGE, selected = %Id, selected_text=%s\n", selected, debugstr_w(lastwrk));
 		TRACE("handling EN_CHANGE, edittext=%s\n",
 		      debugstr_w(edit_text));
 
@@ -1987,7 +1983,7 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr) {
 	if (uMsg == WM_CREATE)
@@ -2154,10 +2150,10 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
             COMCTL32_RefreshSysColors();
             return 0;
 
-	default:
-	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",uMsg,wParam,lParam);
-	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
+        default:
+            if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
+                ERR("unknown msg %04x, wp %#Ix, lp %#Ix\n",uMsg,wParam,lParam);
+            return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
 
diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c
index c707703ccd2..57863928fc7 100644
--- a/dlls/comctl32/commctrl.c
+++ b/dlls/comctl32/commctrl.c
@@ -167,7 +167,7 @@ BOOL WINAPI RegisterClassNameW(const WCHAR *class)
 
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
-    TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
+    TRACE("%p, %#lx, %p\n", hinstDLL, fdwReason, lpvReserved);
 
     switch (fdwReason) {
 	case DLL_PROCESS_ATTACH:
@@ -293,8 +293,7 @@ MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
 
     switch (uMsg) {
 	case WM_MENUSELECT:
-	    TRACE("WM_MENUSELECT wParam=0x%lX lParam=0x%lX\n",
-		   wParam, lParam);
+	    TRACE("WM_MENUSELECT wParam %#Ix, lParam %#Ix\n", wParam, lParam);
 
             if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
                 /* menu was closed */
@@ -323,8 +322,7 @@ MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
 	    break;
 
         case WM_COMMAND :
-	    TRACE("WM_COMMAND wParam=0x%lX lParam=0x%lX\n",
-		   wParam, lParam);
+	    TRACE("WM_COMMAND wParam %#Ix, lParam %#Ix\n", wParam, lParam);
 	    /* WM_COMMAND is not invalid since it is documented
 	     * in the windows api reference. So don't output
              * any FIXME for WM_COMMAND
@@ -374,7 +372,7 @@ ShowHideMenuCtl (HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
 {
     LPINT lpMenuId;
 
-    TRACE("%p, %lx, %p\n", hwnd, uFlags, lpInfo);
+    TRACE("%p, %Ix, %p\n", hwnd, uFlags, lpInfo);
 
     if (lpInfo == NULL)
 	return FALSE;
@@ -715,7 +713,7 @@ InitCommonControlsEx (const INITCOMMONCONTROLSEX *lpInitCtrls)
     if (!lpInitCtrls || lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
         return FALSE;
 
-    TRACE("(0x%08x)\n", lpInitCtrls->dwICC);
+    TRACE("%#lx\n", lpInitCtrls->dwICC);
     return TRUE;
 }
 
@@ -977,9 +975,8 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
     pdvi->dwBuildNumber = 2919;
     pdvi->dwPlatformID = 6304;
 
-    TRACE("%u.%u.%u.%u\n",
-	   pdvi->dwMajorVersion, pdvi->dwMinorVersion,
-	   pdvi->dwBuildNumber, pdvi->dwPlatformID);
+    TRACE("%lu.%lu.%lu.%lu\n", pdvi->dwMajorVersion, pdvi->dwMinorVersion,
+            pdvi->dwBuildNumber, pdvi->dwPlatformID);
 
     return S_OK;
 }
@@ -1084,7 +1081,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
    LPSUBCLASS_INFO stack;
    LPSUBCLASSPROCS proc;
 
-   TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
+   TRACE("%p, %p, %Ix, %Ix\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
 
    if (!hWnd || !pfnSubclass)
        return FALSE;
@@ -1171,7 +1168,7 @@ BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
    const SUBCLASS_INFO *stack;
    const SUBCLASSPROCS *proc;
 
-   TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
+   TRACE("%p, %p, %Ix, %p\n", hWnd, pfnSubclass, uID, pdwRef);
 
    /* See if we have been called for this window */
    stack = GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1214,7 +1211,7 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
    LPSUBCLASSPROCS proc;
    BOOL ret = FALSE;
 
-   TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
+   TRACE("%p, %p, %Ix.\n", hWnd, pfnSubclass, uID);
 
    /* Find the Subclass to remove */
    stack = GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1267,8 +1264,8 @@ static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam
    LPSUBCLASS_INFO stack;
    LPSUBCLASSPROCS proc;
    LRESULT ret;
-    
-   TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
+
+   TRACE("%p, %#x, %#Ix, %#Ix\n", hWnd, uMsg, wParam, lParam);
 
    stack = GetPropW (hWnd, COMCTL32_wSubclass);
    if (!stack) {
@@ -1317,8 +1314,8 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
 {
    LPSUBCLASS_INFO stack;
    LRESULT ret;
-   
-   TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
+
+   TRACE("%p, %#x, %#Ix, %#Ix\n", hWnd, uMsg, wParam, lParam);
 
    /* retrieve our little stack from the Properties */
    stack = GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1669,7 +1666,7 @@ int WINAPI DrawShadowText(HDC hdc, LPCWSTR text, UINT length, RECT *rect, DWORD
     COLORREF clr;
     RECT r;
 
-    FIXME("(%p, %s, %d, %p, 0x%08x, 0x%08x, 0x%08x, %d, %d): semi-stub\n", hdc, debugstr_w(text),
+    FIXME("%p, %s, %d, %p, %#lx, %#lx, %#lx, %d, %d: semi-stub\n", hdc, debugstr_w(text),
         length, rect, flags, crText, crShadow, offset_x, offset_y);
 
     bkmode = SetBkMode(hdc, TRANSPARENT);
@@ -1972,7 +1969,7 @@ static void MRU_SaveChanged(WINEMRULIST *mp)
             {
                 ERR("error saving /%s/, err=%d\n", debugstr_w(realname), err);
             }
-            TRACE("saving value for name /%s/ size=%d\n", debugstr_w(realname), witem->size);
+            TRACE("saving value for name /%s/ size %ld\n", debugstr_w(realname), witem->size);
         }
     }
     RegCloseKey(newkey);
@@ -2071,7 +2068,7 @@ INT WINAPI FindMRUData(HANDLE hList, const void *data, DWORD cbData, int *pos)
     if (pos && (ret != -1))
         *pos = 'a' + i;
 
-    TRACE("%p, %p, %d, %p, returning %d.\n", hList, data, cbData, pos, ret);
+    TRACE("%p, %p, %ld, %p, returning %d.\n", hList, data, cbData, pos, ret);
 
     return ret;
 }
@@ -2131,7 +2128,7 @@ INT WINAPI AddMRUData(HANDLE hList, const void *data, DWORD cbData)
     mp->wineFlags |= WMRUF_CHANGED;
     mp->realMRU[0] = replace + 'a';
 
-    TRACE("(%p, %p, %d) adding data, /%c/ now most current\n", hList, data, cbData, replace+'a');
+    TRACE("%p, %p, %ld adding data, /%c/ now most current\n", hList, data, cbData, replace+'a');
 
     if (!(mp->extview.fFlags & MRU_CACHEWRITE))
     {
@@ -2268,7 +2265,7 @@ static HANDLE create_mru_list(WINEMRULIST *mp)
             KEY_READ | KEY_WRITE, 0, &newkey, &dwdisp)))
     {
         /* error - what to do ??? */
-        ERR("(%u %u %x %p %s %p): Could not open key, error=%d\n", mp->extview.cbSize, mp->extview.uMax, mp->extview.fFlags,
+        ERR("%lu, %u, %x, %p, %s, %p: Could not open key, error=%d\n", mp->extview.cbSize, mp->extview.uMax, mp->extview.fFlags,
                 mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey), mp->extview.u.string_cmpfn, err);
         return 0;
     }
@@ -2286,7 +2283,7 @@ static HANDLE create_mru_list(WINEMRULIST *mp)
         else
             datasize /= sizeof(WCHAR);
 
-        TRACE("MRU list = %s, datasize = %d\n", debugstr_w(mp->realMRU), datasize);
+        TRACE("MRU list = %s, datasize = %ld\n", debugstr_w(mp->realMRU), datasize);
 
         mp->cursize = datasize - 1;
         /* datasize now has number of items in the MRUList */
@@ -2314,7 +2311,7 @@ static HANDLE create_mru_list(WINEMRULIST *mp)
     else
         mp->cursize = 0;
 
-    TRACE("(%u %u %x %p %s %p): Current Size = %d\n", mp->extview.cbSize, mp->extview.uMax, mp->extview.fFlags,
+    TRACE("%lu, %u, %x, %p, %s, %p: Current Size = %ld\n", mp->extview.cbSize, mp->extview.uMax, mp->extview.fFlags,
             mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey), mp->extview.u.string_cmpfn, mp->cursize);
     return mp;
 }
@@ -2412,7 +2409,7 @@ INT WINAPI EnumMRUListW(HANDLE hList, INT nItemPos, void *buffer, DWORD nBufferS
     witem = mp->array[desired];
     datasize = min(witem->size, nBufferSize);
     memcpy(buffer, &witem->datastart, datasize);
-    TRACE("(%p, %d, %p, %d): returning len=%d\n", hList, nItemPos, buffer, nBufferSize, datasize);
+    TRACE("(%p, %d, %p, %ld): returning len %d\n", hList, nItemPos, buffer, nBufferSize, datasize);
     return datasize;
 }
 
@@ -2446,7 +2443,7 @@ INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, void *buffer, DWORD nBufferS
         ((char *)buffer)[ datasize - 1 ] = '\0';
         datasize = lenA - 1;
     }
-    TRACE("(%p, %d, %p, %d): returning len=%d\n", hList, nItemPos, buffer, nBufferSize, datasize);
+    TRACE("(%p, %d, %p, %ld): returning len=%d\n", hList, nItemPos, buffer, nBufferSize, datasize);
     return datasize;
 }
 
@@ -2606,7 +2603,7 @@ static LRESULT DoNotify(const struct NOTIFYDATA *notify, UINT code, NMHDR *hdr)
     NMHDR *lpNmh = NULL;
     UINT idFrom = 0;
 
-    TRACE("%p, %p, %d, %p, %#x.\n", notify->hwndFrom, notify->hwndTo, code, hdr, notify->dwParam5);
+    TRACE("%p, %p, %d, %p, %#lx.\n", notify->hwndFrom, notify->hwndTo, code, hdr, notify->dwParam5);
 
     if (!notify->hwndTo)
         return 0;
@@ -2676,7 +2673,7 @@ LRESULT WINAPI SendNotifyEx(HWND hwndTo, HWND hwndFrom, UINT code, NMHDR *hdr, D
     struct NOTIFYDATA notify;
     HWND hwndNotify;
 
-    TRACE("(%p %p %d %p %#x)\n", hwndFrom, hwndTo, code, hdr, dwParam5);
+    TRACE("%p, %p, %d, %p, %#lx\n", hwndFrom, hwndTo, code, hdr, dwParam5);
 
     hwndNotify = hwndTo;
     if (!hwndTo)
diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c
index f8827d4e26c..f142ea8ede5 100644
--- a/dlls/comctl32/datetime.c
+++ b/dlls/comctl32/datetime.c
@@ -1455,7 +1455,7 @@ DATETIME_Size (DATETIME_INFO *infoPtr, INT width, INT height)
     infoPtr->rcClient.bottom = height;
     infoPtr->rcClient.right = width;
 
-    TRACE("Height=%d, Width=%d\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
+    TRACE("Height %ld, Width %ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
 
     infoPtr->rcDraw = infoPtr->rcClient;
     
@@ -1489,8 +1489,7 @@ DATETIME_Size (DATETIME_INFO *infoPtr, INT width, INT height)
 static LRESULT
 DATETIME_StyleChanging(DATETIME_INFO *infoPtr, WPARAM wStyleType, STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     /* block DTS_SHOWNONE change */
     if ((lpss->styleNew ^ lpss->styleOld) & DTS_SHOWNONE)
@@ -1507,8 +1506,7 @@ DATETIME_StyleChanging(DATETIME_INFO *infoPtr, WPARAM wStyleType, STYLESTRUCT *l
 static LRESULT 
 DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
   
@@ -1595,7 +1593,7 @@ static BOOL DATETIME_GetIdealSize(DATETIME_INFO *infoPtr, SIZE *size)
     size->cx += 12;
     size->cy += 4;
 
-    TRACE("cx=%d cy=%d\n", size->cx, size->cy);
+    TRACE("cx %ld, cy %ld\n", size->cx, size->cy);
     return TRUE;
 }
 
@@ -1710,7 +1708,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     DATETIME_INFO *infoPtr = ((DATETIME_INFO *)GetWindowLongPtrW (hwnd, 0));
 
-    TRACE ("%x, %lx, %lx\n", uMsg, wParam, lParam);
+    TRACE("%x, %Ix, %Ix\n", uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_CREATE) && (uMsg != WM_NCCREATE))
 	return DefWindowProcW( hwnd, uMsg, wParam, lParam );
@@ -1839,10 +1837,9 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
         return CB_ERR;
 
     default:
-	if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
-	return DefWindowProcW (hwnd, uMsg, wParam, lParam);
+        if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
+            ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
+        return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
 
diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c
index 6dce9575b59..b8d23f6cafa 100644
--- a/dlls/comctl32/dpa.c
+++ b/dlls/comctl32/dpa.c
@@ -110,7 +110,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc,
     if (errCode != S_OK)
         return errCode;
 
-    TRACE ("dwSize=%u dwData2=%u dwItems=%u\n",
+    TRACE ("dwSize=%lu dwData2=%lu dwItems=%lu\n",
            streamData.dwSize, streamData.dwData2, streamData.dwItems);
 
     if (ulRead < sizeof(STREAMDATA) ||
@@ -152,7 +152,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, PFNDPASTREAM loadProc,
 
     /* store the handle to the dpa */
     *phDpa = hDpa;
-    TRACE ("new hDpa=%p, errorcode=%x\n", hDpa, errCode);
+    TRACE ("new hDpa=%p, errorcode %lx\n", hDpa, errCode);
 
     return errCode;
 }
@@ -271,8 +271,7 @@ BOOL WINAPI DPA_Merge (HDPA hdpa1, HDPA hdpa2, DWORD dwFlags,
     INT nResult, i;
     INT nIndex;
 
-    TRACE("(%p %p %08x %p %p %08lx)\n",
-           hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
+    TRACE("%p, %p, %#lx, %p, %p, %#Ix\n", hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
 
     if (IsBadWritePtr (hdpa1, sizeof(*hdpa1)))
         return FALSE;
@@ -526,7 +525,7 @@ HDPA WINAPI DPA_Clone (const HDPA hdpa, HDPA hdpaNew)
  */
 LPVOID WINAPI DPA_GetPtr (HDPA hdpa, INT_PTR nIndex)
 {
-    TRACE("(%p %ld)\n", hdpa, nIndex);
+    TRACE("%p, %Id\n", hdpa, nIndex);
 
     if (!hdpa)
         return NULL;
@@ -535,7 +534,7 @@ LPVOID WINAPI DPA_GetPtr (HDPA hdpa, INT_PTR nIndex)
         return NULL;
     }
     if ((nIndex < 0) || (nIndex >= hdpa->nItemCount)) {
-        WARN("not enough pointers in array (%ld vs %d).\n",nIndex,hdpa->nItemCount);
+        WARN("not enough pointers in array (%Id vs %d).\n",nIndex,hdpa->nItemCount);
         return NULL;
     }
 
@@ -815,7 +814,7 @@ BOOL WINAPI DPA_Sort (HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
     if (!hdpa || !pfnCompare)
         return FALSE;
 
-    TRACE("(%p %p 0x%lx)\n", hdpa, pfnCompare, lParam);
+    TRACE("%p, %p, %#Ix\n", hdpa, pfnCompare, lParam);
 
     if ((hdpa->nItemCount > 1) && (hdpa->ptrs))
         DPA_QuickSort (hdpa->ptrs, 0, hdpa->nItemCount - 1,
@@ -848,8 +847,7 @@ INT WINAPI DPA_Search (HDPA hdpa, LPVOID pFind, INT nStart,
     if (!hdpa || !pfnCompare || !pFind)
         return -1;
 
-    TRACE("(%p %p %d %p 0x%08lx 0x%08x)\n",
-           hdpa, pFind, nStart, pfnCompare, lParam, uOptions);
+    TRACE("%p, %p, %d, %p, %#Ix, %#x\n", hdpa, pFind, nStart, pfnCompare, lParam, uOptions);
 
     if (uOptions & DPAS_SORTED) {
         /* array is sorted --> use binary search */
diff --git a/dlls/comctl32/draglist.c b/dlls/comctl32/draglist.c
index ed52e5e9068..183e4e82beb 100644
--- a/dlls/comctl32/draglist.c
+++ b/dlls/comctl32/draglist.c
@@ -292,8 +292,7 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
     INT nIndex;
     DWORD dwScrollTime;
 
-    TRACE("(%p %d x %d %s)\n",
-           hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
+    TRACE("%p, %ld x %ld, %s\n", hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
 
     ScreenToClient (hwndLB, &pt);
     GetClientRect (hwndLB, &rcClient);
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c
index d9354a107b1..f89e11c9203 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -349,7 +349,7 @@ static SCRIPT_STRING_ANALYSIS EDIT_UpdateUniscribeData_linedef(EDITSTATE *es, HD
                                          NULL, NULL, NULL, &tabdef, NULL, &line_def->ssa);
 		if (FAILED(hr))
 		{
-			WARN("ScriptStringAnalyse failed (%x)\n",hr);
+			WARN("ScriptStringAnalyse failed, hr %#lx.\n", hr);
 			line_def->ssa = NULL;
 		}
 
@@ -2355,7 +2355,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
     /* The text buffer handle belongs to the app */
     es->hlocapp = es->hloc32W;
 
-    TRACE("Returning %p, LocalSize() = %ld\n", es->hlocapp, LocalSize(es->hlocapp));
+    TRACE("Returning %p, LocalSize() = %Id\n", es->hlocapp, LocalSize(es->hlocapp));
     return es->hlocapp;
 }
 
@@ -3896,7 +3896,7 @@ static LRESULT  EDIT_WM_StyleChanged ( EDITSTATE *es, WPARAM which, const STYLES
         } else if (GWL_EXSTYLE == which) {
                 ; /* FIXME - what is needed here */
         } else {
-                WARN ("Invalid style change %ld\n",which);
+                WARN ("Invalid style change %#Ix.\n", which);
         }
 
         return 0;
@@ -4045,7 +4045,7 @@ static LRESULT EDIT_WM_HScroll(EDITSTATE *es, INT action, INT pos)
 		    INT fw = es->format_rect.right - es->format_rect.left;
 		    ret = es->text_width ? es->x_offset * 100 / (es->text_width - fw) : 0;
 		}
-		TRACE("EM_GETTHUMB: returning %ld\n", ret);
+		TRACE("EM_GETTHUMB: returning %Id\n", ret);
 		return ret;
 	}
 	case EM_LINESCROLL:
@@ -4168,7 +4168,7 @@ static LRESULT EDIT_WM_VScroll(EDITSTATE *es, INT action, INT pos)
 		    INT vlc = get_vertical_line_count(es);
 		    ret = es->line_count ? es->y_offset * 100 / (es->line_count - vlc) : 0;
 		}
-		TRACE("EM_GETTHUMB: returning %ld\n", ret);
+		TRACE("EM_GETTHUMB: returning %Id\n", ret);
 		return ret;
 	}
 	case EM_LINESCROLL:
@@ -4401,7 +4401,7 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
 	EDITSTATE *es;
 	UINT alloc_size;
 
-    TRACE("Creating edit control, style = %08x\n", lpcs->style);
+    TRACE("Creating edit control, style = %#lx\n", lpcs->style);
 
     if (!(es = heap_alloc_zero(sizeof(*es))))
         return FALSE;
@@ -4600,7 +4600,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
     LRESULT result = 0;
     RECT *rect;
 
-    TRACE("hwnd=%p msg=%#x wparam=%lx lparam=%lx\n", hwnd, msg, wParam, lParam);
+    TRACE("hwnd %p, msg %#x, wparam %Ix, lparam %Ix\n", hwnd, msg, wParam, lParam);
 
     if (!es && msg != WM_NCCREATE)
         return DefWindowProcW(hwnd, msg, wParam, lParam);
@@ -5108,7 +5108,7 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
     if (IsWindow(hwnd) && es && msg != EM_GETHANDLE)
         EDIT_UnlockBuffer(es, FALSE);
 
-    TRACE("hwnd=%p msg=%x -- 0x%08lx\n", hwnd, msg, result);
+    TRACE("hwnd=%p msg=%x -- %#Ix\n", hwnd, msg, result);
 
     return result;
 }
diff --git a/dlls/comctl32/flatsb.c b/dlls/comctl32/flatsb.c
index 66e25c307fa..1cedca98a6c 100644
--- a/dlls/comctl32/flatsb.c
+++ b/dlls/comctl32/flatsb.c
@@ -227,7 +227,7 @@ FlatSB_SetScrollRange(HWND hwnd, int nBar, INT min, INT max, BOOL bRedraw)
 static LRESULT
 FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("[%p] wParam=%04lx lParam=%08lx\n", hwnd, wParam, lParam);
+    TRACE("[%p] wParam %Ix, lParam %Ix\n", hwnd, wParam, lParam);
     return 0;
 }
 
@@ -235,7 +235,7 @@ FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
 static LRESULT
 FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("[%p] wParam=%04lx lParam=%08lx\n", hwnd, wParam, lParam);
+    TRACE("[%p] wParam %Ix, lParam %Ix\n", hwnd, wParam, lParam);
     return 0;
 }
 
@@ -256,8 +256,7 @@ FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-                    uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %#Ix, lp %#Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c
index 8bb39261dd1..be4c5616bb7 100644
--- a/dlls/comctl32/header.c
+++ b/dlls/comctl32/header.c
@@ -2094,8 +2094,7 @@ static LRESULT HEADER_SetRedraw(HEADER_INFO *infoPtr, WPARAM wParam, LPARAM lPar
 static INT HEADER_StyleChanged(HEADER_INFO *infoPtr, WPARAM wStyleType,
                                const STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
 
@@ -2128,7 +2127,8 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     HEADER_INFO *infoPtr = (HEADER_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, msg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lParam %Ix\n", hwnd, msg, wParam, lParam);
+
     if (!infoPtr && (msg != WM_CREATE))
 	return DefWindowProcW (hwnd, msg, wParam, lParam);
     switch (msg) {
@@ -2266,8 +2266,7 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
         default:
             if ((msg >= WM_USER) && (msg < WM_APP) && !COMCTL32_IsReflectedMessage(msg))
-		ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
-		     msg, wParam, lParam );
+                ERR("unknown msg %04x, wp %#Ix, lp %#Ix\n", msg, wParam, lParam );
 	    return DefWindowProcW(hwnd, msg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/hotkey.c b/dlls/comctl32/hotkey.c
index 7808660e7f5..f27b71e3124 100644
--- a/dlls/comctl32/hotkey.c
+++ b/dlls/comctl32/hotkey.c
@@ -290,7 +290,7 @@ HOTKEY_KeyDown (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
     if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
         return 0;
 
-    TRACE("() Key: %d\n", key);
+    TRACE("() Key: %ld\n", key);
 
     wOldHotKey = infoPtr->HotKey;
     bOldMod = infoPtr->CurrMod;
@@ -350,7 +350,7 @@ HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key)
     if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
         return 0;
 
-    TRACE("() Key: %d\n", key);
+    TRACE("() Key: %ld\n", key);
 
     bOldMod = infoPtr->CurrMod;
 
@@ -511,7 +511,9 @@ static LRESULT WINAPI
 HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     HOTKEY_INFO *infoPtr = (HOTKEY_INFO *)GetWindowLongPtrW (hwnd, 0);
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam);
+
+    TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
+
     if (!infoPtr && (uMsg != WM_NCCREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     switch (uMsg)
@@ -577,8 +579,7 @@ HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
     return 0;
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 155d4b2a956..22d8d8c40e0 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -342,13 +342,13 @@ IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount)
 
     imagelist_get_bitmap_size(himl, nNewCount, &sz);
 
-    TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, sz.cx, sz.cy, nNewCount);
+    TRACE("Create expanded bitmaps : himl=%p x=%ld y=%ld count=%d\n", himl, sz.cx, sz.cy, nNewCount);
     hdcBitmap = CreateCompatibleDC (0);
 
     hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount);
 
     if (hbmNewBitmap == 0)
-        ERR("creating new image bitmap (x=%d y=%d)!\n", sz.cx, sz.cy);
+        ERR("creating new image bitmap (x=%ld y=%ld)!\n", sz.cx, sz.cy);
 
     if (himl->cCurImage)
     {
@@ -527,7 +527,8 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
     HBITMAP hMaskBitmap;
     COLORREF bkColor;
 
-    TRACE("himl=%p hbitmap=%p clrmask=%x\n", himl, hBitmap, clrMask);
+    TRACE("himl %p, hbitmap %p, clrmask %#lx\n", himl, hBitmap, clrMask);
+
     if (!is_valid(himl))
         return -1;
 
@@ -2209,7 +2210,7 @@ static void *read_bitmap(IStream *pstm, BITMAPINFO *bmi)
     if ((bmi->bmiHeader.biSize != sizeof(bmi->bmiHeader)))
         return NULL;
 
-    TRACE("width %u, height %u, planes %u, bpp %u\n",
+    TRACE("width %lu, height %lu, planes %u, bpp %u\n",
           bmi->bmiHeader.biWidth, bmi->bmiHeader.biHeight,
           bmi->bmiHeader.biPlanes, bmi->bmiHeader.biBitCount);
 
@@ -2793,7 +2794,7 @@ ImageList_SetDragCursorImage (HIMAGELIST himlDrag, INT iDrag,
 BOOL WINAPI
 ImageList_SetFilter (HIMAGELIST himl, INT i, DWORD dwFilter)
 {
-    FIXME("(%p 0x%x 0x%x):empty stub!\n", himl, i, dwFilter);
+    FIXME("%p, %d, %#lx:empty stub!\n", himl, i, dwFilter);
 
     return FALSE;
 }
@@ -2818,7 +2819,7 @@ ImageList_SetFilter (HIMAGELIST himl, INT i, DWORD dwFilter)
 DWORD WINAPI
 ImageList_SetFlags(HIMAGELIST himl, DWORD flags)
 {
-    FIXME("(%p %08x):empty stub\n", himl, flags);
+    FIXME("(%p %#lx):empty stub\n", himl, flags);
     return 0;
 }
 
@@ -3043,7 +3044,7 @@ static BOOL _write_bitmap(HBITMAP hBitmap, IStream *pstm)
     if (!result)
 	goto failed;
 
-    TRACE("width %u, height %u, planes %u, bpp %u\n",
+    TRACE("width %lu, height %lu, planes %u, bpp %u\n",
           bmih->biWidth, bmih->biHeight,
           bmih->biPlanes, bmih->biBitCount);
 
@@ -3063,7 +3064,7 @@ failed:
  */
 HRESULT WINAPI ImageList_WriteEx(HIMAGELIST himl, DWORD flags, IStream *pstm)
 {
-    FIXME("%p %08x %p: semi-stub\n", himl, flags, pstm);
+    FIXME("%p %#lx %p: semi-stub\n", himl, flags, pstm);
     return ImageList_Write(himl, pstm) ? S_OK : E_FAIL;
 }
 
@@ -3140,7 +3141,7 @@ static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count)
         char buffer[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)];
         BITMAPINFO *bmi = (BITMAPINFO *)buffer;
 
-        TRACE("Creating DIBSection %d x %d, %d Bits per Pixel\n",
+        TRACE("Creating DIBSection %ld x %ld, %d Bits per Pixel\n",
               sz.cx, sz.cy, himl->uBitsPixel);
 
         memset( buffer, 0, sizeof(buffer) );
@@ -3272,7 +3273,7 @@ static ULONG WINAPI ImageListImpl_AddRef(IImageList2 *iface)
     HIMAGELIST imgl = impl_from_IImageList2(iface);
     ULONG ref = InterlockedIncrement(&imgl->ref);
 
-    TRACE("(%p) refcount=%u\n", iface, ref);
+    TRACE("%p, refcount %lu\n", iface, ref);
     return ref;
 }
 
@@ -3281,7 +3282,7 @@ static ULONG WINAPI ImageListImpl_Release(IImageList2 *iface)
     HIMAGELIST This = impl_from_IImageList2(iface);
     ULONG ref = InterlockedDecrement(&This->ref);
 
-    TRACE("(%p) refcount=%u\n", iface, ref);
+    TRACE("%p, refcount %lu\n", iface, ref);
 
     if (ref == 0)
     {
@@ -3673,7 +3674,7 @@ static HRESULT WINAPI ImageListImpl_Resize(IImageList2 *iface, INT cx, INT cy)
 
 static HRESULT WINAPI ImageListImpl_GetOriginalSize(IImageList2 *iface, INT image, DWORD flags, INT *cx, INT *cy)
 {
-    FIXME("(%p)->(%d %x %p %p): stub\n", iface, image, flags, cx, cy);
+    FIXME("(%p)->(%d %lx %p %p): stub\n", iface, image, flags, cx, cy);
     return E_NOTIMPL;
 }
 
@@ -3697,13 +3698,13 @@ static HRESULT WINAPI ImageListImpl_GetCallback(IImageList2 *iface, REFIID riid,
 
 static HRESULT WINAPI ImageListImpl_ForceImagePresent(IImageList2 *iface, INT image, DWORD flags)
 {
-    FIXME("(%p)->(%d %x): stub\n", iface, image, flags);
+    FIXME("(%p)->(%d %lx): stub\n", iface, image, flags);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI ImageListImpl_DiscardImages(IImageList2 *iface, INT first_image, INT last_image, DWORD flags)
 {
-    FIXME("(%p)->(%d %d %x): stub\n", iface, first_image, last_image, flags);
+    FIXME("(%p)->(%d %d %lx): stub\n", iface, first_image, last_image, flags);
     return E_NOTIMPL;
 }
 
@@ -3727,14 +3728,14 @@ static HRESULT WINAPI ImageListImpl_Initialize(IImageList2 *iface, INT cx, INT c
 
 static HRESULT WINAPI ImageListImpl_Replace2(IImageList2 *iface, INT i, HBITMAP image, HBITMAP mask, IUnknown *unk, DWORD flags)
 {
-    FIXME("(%p)->(%d %p %p %p %x): stub\n", iface, i, image, mask, unk, flags);
+    FIXME("(%p)->(%d %p %p %p %lx): stub\n", iface, i, image, mask, unk, flags);
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI ImageListImpl_ReplaceFromImageList(IImageList2 *iface, INT i, IImageList *imagelist, INT src,
     IUnknown *unk, DWORD flags)
 {
-    FIXME("(%p)->(%d %p %d %p %x): stub\n", iface, i, imagelist, src, unk, flags);
+    FIXME("(%p)->(%d %p %d %p %lx): stub\n", iface, i, imagelist, src, unk, flags);
     return E_NOTIMPL;
 }
 
diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c
index f24fb4a9335..146a5a5ae1f 100644
--- a/dlls/comctl32/ipaddress.c
+++ b/dlls/comctl32/ipaddress.c
@@ -509,7 +509,7 @@ IPADDRESS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
     INT index, len = 0, startsel, endsel;
     IPPART_INFO *part;
 
-    TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg 0x%x, wparam %#Ix, lparam %#Ix\n", hwnd, uMsg, wParam, lParam);
 
     if ((index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0)
     {
@@ -592,7 +592,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     IPADDRESS_INFO *infoPtr = (IPADDRESS_INFO *)GetWindowLongPtrW (hwnd, 0);
 
-    TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg 0x%x, wparam %#Ix, lparam %#Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_CREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -654,7 +654,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
     return 0;
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 1edb233f104..08bc4db4362 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -2683,7 +2683,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam,
     }
     if (descr->style & LBS_COMBOBOX) lphc = descr->lphc;
 
-    TRACE("[%p]: msg %#x wp %08lx lp %08lx\n", descr->self, msg, wParam, lParam );
+    TRACE("[%p]: msg %#x, wp %Ix, lp %Ix\n", descr->self, msg, wParam, lParam );
 
     switch(msg)
     {
@@ -3143,8 +3143,7 @@ static LRESULT CALLBACK LISTBOX_WindowProc( HWND hwnd, UINT msg, WPARAM wParam,
 
     default:
         if ((msg >= WM_USER) && (msg < 0xc000))
-            WARN("[%p]: unknown msg %04x wp %08lx lp %08lx\n",
-                 hwnd, msg, wParam, lParam );
+            WARN("[%p]: unknown msg %04x, wp %Ix, lp %Ix\n", hwnd, msg, wParam, lParam );
     }
 
     return DefWindowProcW( hwnd, msg, wParam, lParam );
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 4176fb72c63..cd7fec28e27 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -407,13 +407,13 @@ typedef struct tagLISTVIEW_INFO
 
 /* Dump the LISTVIEW_INFO structure to the debug channel */
 #define LISTVIEW_DUMP(iP) do { \
-  TRACE("hwndSelf=%p, clrBk=0x%06x, clrText=0x%06x, clrTextBk=0x%06x, ItemHeight=%d, ItemWidth=%d, Style=0x%08x\n", \
+  TRACE("hwndSelf=%p, clrBk=%#lx, clrText=%#lx, clrTextBk=%#lx, ItemHeight=%d, ItemWidth=%d, Style=%#lx\n", \
         iP->hwndSelf, iP->clrBk, iP->clrText, iP->clrTextBk, \
         iP->nItemHeight, iP->nItemWidth, iP->dwStyle); \
-  TRACE("hwndSelf=%p, himlNor=%p, himlSml=%p, himlState=%p, Focused=%d, Hot=%d, exStyle=0x%08x, Focus=%d\n", \
+  TRACE("hwndSelf=%p, himlNor=%p, himlSml=%p, himlState=%p, Focused=%d, Hot=%d, exStyle=%#lx, Focus=%d\n", \
         iP->hwndSelf, iP->himlNormal, iP->himlSmall, iP->himlState, \
         iP->nFocusedItem, iP->nHotItem, iP->dwLvExStyle, iP->bFocus ); \
-  TRACE("hwndSelf=%p, ntmH=%d, icSz.cx=%d, icSz.cy=%d, icSp.cx=%d, icSp.cy=%d, notifyFmt=%d\n", \
+  TRACE("hwndSelf=%p, ntmH=%d, icSz.cx=%ld, icSz.cy=%ld, icSp.cx=%ld, icSp.cy=%ld, notifyFmt=%d\n", \
         iP->hwndSelf, iP->ntmHeight, iP->iconSize.cx, iP->iconSize.cy, \
         iP->iconSpacing.cx, iP->iconSpacing.cy, iP->notifyFormat); \
   TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, wine_dbgstr_rect(&iP->rcList)); \
@@ -607,7 +607,7 @@ static const char* debugnmlistview(const NMLISTVIEW *plvnm)
 {
     if (!plvnm) return "(null)";
     return wine_dbg_sprintf("iItem=%d, iSubItem=%d, uNewState=0x%x,"
-	         " uOldState=0x%x, uChanged=0x%x, ptAction=%s, lParam=%ld",
+	         " uOldState=0x%x, uChanged=0x%x, ptAction=%s, lParam=%Id",
 	         plvnm->iItem, plvnm->iSubItem, plvnm->uNewState, plvnm->uOldState,
 		 plvnm->uChanged, wine_dbgstr_point(&plvnm->ptAction), plvnm->lParam);
 }
@@ -637,7 +637,7 @@ static const char* debuglvitem_t(const LVITEMW *lpLVItem, BOOL isW)
     if (len == -1) goto end;
     buf += len; size -= len;
     if (lpLVItem->mask & LVIF_PARAM)
-	len = snprintf(buf, size, "lParam=%lx, ", lpLVItem->lParam);
+	len = snprintf(buf, size, "lParam=%Ix, ", lpLVItem->lParam);
     else len = 0;
     if (len == -1) goto end;
     buf += len; size -= len;
@@ -829,7 +829,7 @@ static LRESULT notify_hdr(const LISTVIEW_INFO *infoPtr, INT code, LPNMHDR pnmh)
     pnmh->code = code;
     result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, pnmh->idFrom, (LPARAM)pnmh);
 
-    TRACE("  <= %ld\n", result);
+    TRACE("  <= %Id\n", result);
 
     return result;
 }
@@ -2930,7 +2930,7 @@ static INT LISTVIEW_CalculateItemWidth(const LISTVIEW_INFO *infoPtr)
 {
     INT nItemWidth = 0;
 
-    TRACE("uView=%d\n", infoPtr->uView);
+    TRACE("view %ld\n", infoPtr->uView);
 
     if (infoPtr->uView == LV_VIEW_ICON)
 	nItemWidth = infoPtr->iconSpacing.cx;
@@ -2990,7 +2990,7 @@ static INT LISTVIEW_CalculateItemHeight(const LISTVIEW_INFO *infoPtr)
 {
     INT nItemHeight;
 
-    TRACE("uView=%d\n", infoPtr->uView);
+    TRACE("view %ld\n", infoPtr->uView);
 
     if (infoPtr->uView == LV_VIEW_ICON)
 	nItemHeight = infoPtr->iconSpacing.cy;
@@ -5972,8 +5972,7 @@ static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara
     LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(GetParent(hwnd), 0);
     BOOL save = TRUE;
 
-    TRACE("(hwnd=%p, uMsg=%x, wParam=%lx, lParam=%lx, isW=%d)\n",
-	  hwnd, uMsg, wParam, lParam, isW);
+    TRACE("hwnd %p, uMsg %x, wParam %Ix, lParam %Ix, isW %d\n", hwnd, uMsg, wParam, lParam, isW);
 
     switch (uMsg)
     {
@@ -6127,7 +6126,7 @@ static HWND LISTVIEW_EditLabelT(LISTVIEW_INFO *infoPtr, INT nItem, BOOL isW)
     sz.cy = rect.bottom - rect.top + 2;
     rect.left -= 2;
     rect.top  -= 1;
-    TRACE("moving edit=(%d,%d)-(%d,%d)\n", rect.left, rect.top, sz.cx, sz.cy);
+    TRACE("moving edit (%ld,%ld)-(%ld,%ld)\n", rect.left, rect.top, sz.cx, sz.cy);
     MoveWindow(infoPtr->hwndEdit, rect.left, rect.top, sz.cx, sz.cy, FALSE);
     ShowWindow(infoPtr->hwndEdit, SW_NORMAL);
     SetFocus(infoPtr->hwndEdit);
@@ -7067,8 +7066,8 @@ static BOOL LISTVIEW_GetItemRect(const LISTVIEW_INFO *infoPtr, INT nItem, LPRECT
         break;
 
     default:
-	WARN("Unknown value: %d\n", lprc->left);
-	return FALSE;
+        WARN("Unknown value: %ld\n", lprc->left);
+        return FALSE;
     }
 
     if (infoPtr->uView == LV_VIEW_DETAILS)
@@ -7112,7 +7111,8 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT item, LPRE
     
     if (!lprc) return FALSE;
 
-    TRACE("(item=%d, subitem=%d, type=%d)\n", item, lprc->top, lprc->left);
+    TRACE("item %d, subitem %ld, type %ld\n", item, lprc->top, lprc->left);
+
     /* Subitem of '0' means item itself, and this works for all control view modes */
     if (lprc->top == 0)
         return LISTVIEW_GetItemRect(infoPtr, item, lprc);
@@ -7157,8 +7157,8 @@ static BOOL LISTVIEW_GetSubItemRect(const LISTVIEW_INFO *infoPtr, INT item, LPRE
         break;
 
     default:
-	ERR("Unknown bounds=%d\n", lprc->left);
-	return FALSE;
+        ERR("Unknown bounds %ld\n", lprc->left);
+        return FALSE;
     }
 
     OffsetRect(&rect, origin.x, y);
@@ -8006,7 +8006,7 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy)
  */
 static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF color)
 {
-    TRACE("(color=%x)\n", color);
+    TRACE("color %lx\n", color);
 
     if(infoPtr->clrBk != color) {
 	if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
@@ -8540,7 +8540,7 @@ static DWORD LISTVIEW_SetExtendedListViewStyle(LISTVIEW_INFO *infoPtr, DWORD mas
 {
     DWORD old_ex_style = infoPtr->dwLvExStyle;
 
-    TRACE("mask=0x%08x, ex_style=0x%08x\n", mask, ex_style);
+    TRACE("mask %#lx, ex_style %#lx\n", mask, ex_style);
 
     /* set new style */
     if (mask)
@@ -8721,7 +8721,7 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy)
     if (cy != 0)
         infoPtr->iconSpacing.cy = cy;
 
-    TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n",
+    TRACE("old=(%d,%d), new=(%ld,%ld), iconSize=(%ld,%ld), ntmH=%d\n",
           LOWORD(oldspacing), HIWORD(oldspacing), infoPtr->iconSpacing.cx, infoPtr->iconSpacing.cy,
 	  infoPtr->iconSize.cx, infoPtr->iconSize.cy,
 	  infoPtr->ntmHeight);
@@ -8820,7 +8820,7 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG
  */
 static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFlags)
 {
-    TRACE("(nItems=%d, dwFlags=%x)\n", nItems, dwFlags);
+    TRACE("nItems %d, flags %#lx\n", nItems, dwFlags);
 
     if (infoPtr->dwStyle & LVS_OWNERDATA)
     {
@@ -9093,7 +9093,7 @@ static INT LISTVIEW_SetSelectionMark(LISTVIEW_INFO *infoPtr, INT nIndex)
  */
 static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF color)
 {
-    TRACE("(color=%x)\n", color);
+    TRACE("color %#lx\n", color);
 
     infoPtr->clrTextBk = color;
     return TRUE;
@@ -9113,7 +9113,7 @@ static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF color)
  */
 static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF color)
 {
-    TRACE("(color=%x)\n", color);
+    TRACE("color %#lx\n", color);
 
     infoPtr->clrText = color;
     return TRUE;
@@ -9218,7 +9218,7 @@ static INT LISTVIEW_SetView(LISTVIEW_INFO *infoPtr, DWORD nView)
   LISTVIEW_UpdateScroll(infoPtr);
   LISTVIEW_InvalidateList(infoPtr);
 
-  TRACE("nView=%d\n", nView);
+  TRACE("nView %ld\n", nView);
 
   return 1;
 }
@@ -9276,7 +9276,7 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare,
     struct sorting_context context;
     int i;
 
-    TRACE("(pfnCompare=%p, lParamSort=%lx)\n", pfnCompare, lParamSort);
+    TRACE("pfnCompare %p, lParamSort %Ix\n", pfnCompare, lParamSort);
 
     if (infoPtr->dwStyle & LVS_OWNERDATA) return FALSE;
 
@@ -9531,7 +9531,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-  TRACE("(lpcs=%p, style=0x%08x)\n", lpcs, lpcs->style);
+  TRACE("lpcs %p, style %#lx\n", lpcs, lpcs->style);
 
   infoPtr->dwStyle = lpcs->style;
   map_style_view(infoPtr);
@@ -9941,7 +9941,7 @@ static LRESULT LISTVIEW_KeyDown(LISTVIEW_INFO *infoPtr, INT nVirtualKey, LONG lK
   INT nItem = -1;
   NMLVKEYDOWN nmKeyDown;
 
-  TRACE("(nVirtualKey=%d, lKeyData=%d)\n", nVirtualKey, lKeyData);
+  TRACE("(nVirtualKey=%d, lKeyData=%ld)\n", nVirtualKey, lKeyData);
 
   /* send LVN_KEYDOWN notification */
   nmKeyDown.wVKey = nVirtualKey;
@@ -10735,7 +10735,7 @@ static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD optio
         return 0;
 
     if (options & ~(PRF_ERASEBKGND|PRF_CLIENT))
-        FIXME("(hdc=%p options=0x%08x) partial stub\n", hdc, options);
+        FIXME("(hdc=%p options %#lx) partial stub\n", hdc, options);
 
     if (options & PRF_ERASEBKGND)
         LISTVIEW_EraseBkgnd(infoPtr, hdc);
@@ -11040,8 +11040,8 @@ static LRESULT LISTVIEW_Size(LISTVIEW_INFO *infoPtr, int Width, int Height)
  */
 static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
 {
-    TRACE("uView=%d, rcList(old)=%s\n", infoPtr->uView, wine_dbgstr_rect(&infoPtr->rcList));
-    
+    TRACE("uView %ld, rcList(old)=%s\n", infoPtr->uView, wine_dbgstr_rect(&infoPtr->rcList));
+
     GetClientRect(infoPtr->hwndSelf, &infoPtr->rcList);
 
     if (infoPtr->uView == LV_VIEW_LIST)
@@ -11114,7 +11114,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
     UINT uNewView, uOldView;
     UINT style;
 
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n",
           wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE || lpss->styleNew == infoPtr->dwStyle) return 0;
@@ -11217,7 +11217,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
 static INT LISTVIEW_StyleChanging(WPARAM wStyleType,
                                   STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n",
           wStyleType, lpss->styleOld, lpss->styleNew);
 
     /* don't forward LVS_OWNERDATA only if not already set to */
@@ -11294,7 +11294,7 @@ static LRESULT LISTVIEW_SetVersion(LISTVIEW_INFO *infoPtr, DWORD iVersion)
 
   infoPtr->iVersion = iVersion;
 
-  TRACE("new version %d\n", iVersion);
+  TRACE("new version %ld\n", iVersion);
 
   return iOldVersion;
 }
@@ -11309,7 +11309,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-  TRACE("(hwnd=%p uMsg=%x wParam=%lx lParam=%lx)\n", hwnd, uMsg, wParam, lParam);
+  TRACE("hwnd %p, uMsg %x, wParam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
 
   if (!infoPtr && (uMsg != WM_NCCREATE))
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
@@ -11805,7 +11805,7 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
   default:
     if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-      ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+      ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
   }
@@ -11867,7 +11867,7 @@ void LISTVIEW_Unregister(void)
 static LRESULT LISTVIEW_Command(LISTVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
 
-    TRACE("(%p %x %x %lx)\n", infoPtr, HIWORD(wParam), LOWORD(wParam), lParam);
+    TRACE("%p, %x, %x, %Ix\n", infoPtr, HIWORD(wParam), LOWORD(wParam), lParam);
 
     if (!infoPtr->hwndEdit) return 0;
 
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 70ea604d2c7..4fc984f6f4b 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -671,7 +671,7 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st)
 {
   INT range;
 
-  TRACE("flag=%d, st=%p\n", flag, st);
+  TRACE("flags %#lx, st %p\n", flag, st);
 
   switch (flag) {
   case GMR_VISIBLE:
@@ -709,7 +709,7 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st)
       break;
   }
   default:
-      WARN("Unknown flag value, got %d\n", flag);
+      WARN("Unknown flag value, got %ld\n", flag);
       range = 0;
   }
 
@@ -1296,7 +1296,7 @@ MONTHCAL_SetColor(MONTHCAL_INFO *infoPtr, UINT index, COLORREF color)
   enum CachedBrush type;
   COLORREF prev;
 
-  TRACE("%p, %d: color %08x\n", infoPtr, index, color);
+  TRACE("%p, %d: color %#lx\n", infoPtr, index, color);
 
   if (index > MCSC_TRAILINGTEXT) return -1;
 
@@ -2071,8 +2071,7 @@ static LRESULT CALLBACK EditWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
 {
     MONTHCAL_INFO *infoPtr = (MONTHCAL_INFO *)GetWindowLongPtrW(GetParent(hwnd), 0);
 
-    TRACE("(hwnd=%p, uMsg=%x, wParam=%lx, lParam=%lx)\n",
-	  hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, uMsg %x, wParam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     switch (uMsg)
     {
@@ -2160,7 +2159,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
 
   hit = MONTHCAL_HitTest(infoPtr, &ht);
 
-  TRACE("%x at %s\n", hit, wine_dbgstr_point(&ht.pt));
+  TRACE("%lx at %s\n", hit, wine_dbgstr_point(&ht.pt));
 
   switch(hit)
   {
@@ -2320,7 +2319,7 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
 static LRESULT
 MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM id)
 {
-  TRACE("%ld\n", id);
+  TRACE("%Id\n", id);
 
   switch(id) {
   case MC_PREVNEXTMONTHTIMER:
@@ -2343,7 +2342,7 @@ MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM id)
     return 0;
   }
   default:
-    ERR("got unknown timer %ld\n", id);
+    ERR("got unknown timer %Id\n", id);
     break;
   }
 
@@ -2449,7 +2448,7 @@ MONTHCAL_EraseBkgnd(const MONTHCAL_INFO *infoPtr, HDC hdc)
 static LRESULT
 MONTHCAL_PrintClient(MONTHCAL_INFO *infoPtr, HDC hdc, DWORD options)
 {
-  FIXME("Partial Stub: (hdc=%p options=0x%08x)\n", hdc, options);
+  FIXME("Partial Stub: (hdc %p options %#lx)\n", hdc, options);
 
   if ((options & PRF_CHECKVISIBLE) && !IsWindowVisible(infoPtr->hwndSelf))
       return 0;
@@ -2705,8 +2704,7 @@ static LRESULT theme_changed (const MONTHCAL_INFO* infoPtr)
 static INT MONTHCAL_StyleChanged(MONTHCAL_INFO *infoPtr, WPARAM wStyleType,
                                  const STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
 
@@ -2722,8 +2720,7 @@ static INT MONTHCAL_StyleChanged(MONTHCAL_INFO *infoPtr, WPARAM wStyleType,
 static INT MONTHCAL_StyleChanging(MONTHCAL_INFO *infoPtr, WPARAM wStyleType,
                                   STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     /* block MCS_MULTISELECT change */
     if ((lpss->styleNew ^ lpss->styleOld) & MCS_MULTISELECT)
@@ -2874,7 +2871,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
   MONTHCAL_INFO *infoPtr = (MONTHCAL_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-  TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam);
+  TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
 
   if (!infoPtr && (uMsg != WM_CREATE))
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
@@ -3015,7 +3012,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
   default:
     if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-      ERR( "unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+      ERR( "unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
   }
 }
diff --git a/dlls/comctl32/nativefont.c b/dlls/comctl32/nativefont.c
index 2e11a9e665a..ede08d155b6 100644
--- a/dlls/comctl32/nativefont.c
+++ b/dlls/comctl32/nativefont.c
@@ -76,8 +76,7 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr(hwnd);
 
-    TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n",
-	  hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %04x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_CREATE))
 	return DefWindowProcW( hwnd, uMsg, wParam, lParam );
@@ -102,8 +101,7 @@ NATIVEFONT_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/pager.c b/dlls/comctl32/pager.c
index b8baa93e15f..7d807c8b2c4 100644
--- a/dlls/comctl32/pager.c
+++ b/dlls/comctl32/pager.c
@@ -219,7 +219,7 @@ PAGER_GetBorder(const PAGER_INFO *infoPtr)
 static inline COLORREF
 PAGER_GetBkColor(const PAGER_INFO *infoPtr)
 {
-    TRACE("[%p] returns %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
+    TRACE("[%p] returns %#lx\n", infoPtr->hwndSelf, infoPtr->clrBk);
     return infoPtr->clrBk;
 }
 
@@ -446,7 +446,7 @@ PAGER_SetBkColor (PAGER_INFO* infoPtr, COLORREF clrBk)
     COLORREF clrTemp = infoPtr->clrBk;
 
     infoPtr->clrBk = clrBk;
-    TRACE("[%p] %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
+    TRACE("[%p] %#lx\n", infoPtr->hwndSelf, infoPtr->clrBk);
 
     /* the native control seems to do things this way */
     SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
@@ -776,7 +776,7 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
 	/* If in one of the buttons the capture and draw buttons */
 	if (rect)
 	{
-            TRACE("[%p] draw btn (%s), Capture %s, style %08x\n",
+            TRACE("[%p] draw btn (%s), Capture %s, style %#lx\n",
                   infoPtr->hwndSelf, wine_dbgstr_rect(rect),
 		  (infoPtr->bCapture) ? "TRUE" : "FALSE",
 		  infoPtr->dwStyle);
@@ -943,7 +943,7 @@ PAGER_Timer (PAGER_INFO* infoPtr, INT nTimerId)
 	else
 	    dir = (infoPtr->dwStyle & PGS_HORZ) ?
 		PGF_SCROLLRIGHT : PGF_SCROLLDOWN;
-	TRACE("[%p] TIMERID1: style=%08x, dir=%d\n",
+	TRACE("[%p] TIMERID1: style=%#lx, dir=%d\n",
               infoPtr->hwndSelf, infoPtr->dwStyle, dir);
 	KillTimer(infoPtr->hwndSelf, TIMERID1);
 	SetTimer(infoPtr->hwndSelf, TIMERID1, REPEAT_DELAY, 0);
@@ -1012,8 +1012,7 @@ PAGER_StyleChanged(PAGER_INFO *infoPtr, WPARAM wStyleType, const STYLESTRUCT *lp
 {
     DWORD oldStyle = infoPtr->dwStyle;
 
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("styletype %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
   
@@ -1464,7 +1463,7 @@ PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     PAGER_INFO *infoPtr = (PAGER_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-    TRACE("(%p, %#x, %#lx, %#lx)\n", hwnd, uMsg, wParam, lParam);
+    TRACE("%p, %#x, %#Ix, %#Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_CREATE))
 	return DefWindowProcW (hwnd, uMsg, wParam, lParam);
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c
index fb4c2dc66dd..f8fc2a14eb0 100644
--- a/dlls/comctl32/progress.c
+++ b/dlls/comctl32/progress.c
@@ -532,7 +532,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
     static const WCHAR themeClass[] = L"Progress";
     HTHEME theme;
 
-    TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam, lParam);
+    TRACE("hwnd %p, msg %04x, wparam %Ix, lParam %Ix\n", hwnd, message, wParam, lParam);
 
     infoPtr = (PROGRESS_INFO *)GetWindowLongPtrW(hwnd, 0);
 
@@ -712,7 +712,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
 
     case PBM_SETSTATE:
         if(wParam != PBST_NORMAL)
-            FIXME("state %04lx not yet handled\n", wParam);
+            FIXME("state %Ix not yet handled\n", wParam);
         return PBST_NORMAL;
 
     case PBM_GETSTATE:
@@ -734,7 +734,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
 
     default:
         if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message))
-	    ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam );
+            ERR("unknown msg %04x, wp %Ix, lp %Ix\n", message, wParam, lParam );
         return DefWindowProcW( hwnd, message, wParam, lParam );
     }
 }
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 556d63f2c75..a512ca9f361 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -321,7 +321,7 @@ static void PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
   psInfo->useCallback = (dwFlags & PSH_USECALLBACK )&& (lppsh->pfnCallback);
 
   memcpy(&psInfo->ppshheader,lppsh,dwSize);
-  TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%d\ndwFlags\t\t%08x\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
+  TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%#lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
 	lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance,
 	debugstr_a(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
 
@@ -365,7 +365,7 @@ static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
   psInfo->useCallback = (dwFlags & PSH_USECALLBACK) && (lppsh->pfnCallback);
 
   memcpy(&psInfo->ppshheader,lppsh,dwSize);
-  TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%d\ndwFlags\t\t%08x\nhwndParent\t%p\nhInstance\t%p\npszCaption\t%s\nnPages\t\t%d\npfnCallback\t%p\n",
+  TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%#lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t%s\nnPages\t\t%d\npfnCallback\t%p\n",
       lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance, debugstr_w(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
 
   if (lppsh->dwFlags & INTRNL_ANY_WIZARD)
@@ -765,8 +765,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
 
   rc.right -= rc.left;
   rc.bottom -= rc.top;
-  TRACE("setting tab %p, rc (0,0)-(%d,%d)\n",
-        hwndTabCtrl, rc.right, rc.bottom);
+  TRACE("setting tab %p, rc (0,0)-(%ld,%ld)\n", hwndTabCtrl, rc.right, rc.bottom);
   SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
 
@@ -787,8 +786,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
   /*
    * Resize the property sheet.
    */
-  TRACE("setting dialog %p, rc (0,0)-(%d,%d)\n",
-        hwndDlg, rc.right, rc.bottom);
+  TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n", hwndDlg, rc.right, rc.bottom);
   SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
   return TRUE;
@@ -820,8 +818,7 @@ static BOOL PROPSHEET_AdjustSizeWizard(HWND hwndDlg, const PropSheetInfo* psInfo
   AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE);
 
   /* Resize the property sheet */
-  TRACE("setting dialog %p, rc (0,0)-(%d,%d)\n",
-        hwndDlg, rc.right, rc.bottom);
+  TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n", hwndDlg, rc.right, rc.bottom);
   SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
                SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
 
@@ -1297,7 +1294,7 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
 	  p++;
 	  break;
 	case 0xffff:
-          TRACE("class ordinal 0x%08x\n",*(const DWORD*)p);
+          TRACE("class ordinal %#lx\n",*(const DWORD*)p);
 	  p += 2;
 	  break;
 	default:
@@ -1313,7 +1310,7 @@ static UINT GetTemplateSize(const DLGTEMPLATE* pTemplate)
 	  p++;
 	  break;
 	case 0xffff:
-          TRACE("text ordinal 0x%08x\n",*(const DWORD*)p);
+          TRACE("text ordinal %#lx\n",*(const DWORD*)p);
 	  p += 2;
 	  break;
 	default:
@@ -1405,7 +1402,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
   if (!pTemplateCopy)
     return FALSE;
   
-  TRACE("copying pTemplate %p into pTemplateCopy %p (%d)\n", pTemplate, pTemplateCopy, resSize);
+  TRACE("copying pTemplate %p into pTemplateCopy %p (%ld)\n", pTemplate, pTemplateCopy, resSize);
   memcpy(pTemplateCopy, pTemplate, resSize);
 
   if (((MyDLGTEMPLATEEX*)pTemplateCopy)->signature == 0xFFFF)
@@ -1674,7 +1671,7 @@ static BOOL PROPSHEET_Finish(HWND hwndDlg)
 
   msgResult = SendMessageW(hwndPage, WM_NOTIFY, 0, (LPARAM) &psn);
 
-  TRACE("msg result %ld\n", msgResult);
+  TRACE("msg result %Id\n", msgResult);
 
   if (msgResult != 0)
     return FALSE;
@@ -2030,7 +2027,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
      * NOTE: The resizing happens every time the page is selected and
      * not only when it's created (some applications depend on it). */
     PROPSHEET_GetPageRect(psInfo, hwndDlg, &rc, ppshpage);
-    TRACE("setting page %p, rc (%s) w=%d, h=%d\n",
+    TRACE("setting page %p, rc (%s) w=%ld, h=%ld\n",
           psInfo->proppage[index].hwndPage, wine_dbgstr_rect(&rc),
           rc.right - rc.left, rc.bottom - rc.top);
     SetWindowPos(psInfo->proppage[index].hwndPage, HWND_TOP,
@@ -2136,7 +2133,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
   PropSheetInfo* psInfo = GetPropW(hwndDlg, PropSheetInfoStr);
   WCHAR szTitle[256];
 
-  TRACE("%s (style %08x)\n", debugstr_w(lpszText), dwStyle);
+  TRACE("%s (style %#lx)\n", debugstr_w(lpszText), dwStyle);
   if (IS_INTRESOURCE(lpszText)) {
     if (!LoadStringW(psInfo->ppshheader.hInstance, LOWORD(lpszText), szTitle, ARRAY_SIZE(szTitle)))
       return;
@@ -2458,7 +2455,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
   HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
   BOOL enable_finish = ((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH);
 
-  TRACE("%d\n", dwFlags);
+  TRACE("%lx\n", dwFlags);
 
   EnableWindow(hwndBack, dwFlags & PSWIZB_BACK);
   EnableWindow(hwndNext, dwFlags & PSWIZB_NEXT);
@@ -3444,8 +3441,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
 static INT_PTR CALLBACK
 PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-  TRACE("hwnd=%p msg=0x%04x wparam=%lx lparam=%lx\n",
-	hwnd, uMsg, wParam, lParam);
+  TRACE("hwnd %p, msg=0x%04x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
 
   switch (uMsg)
   {
diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 6a065514e60..61fd30c445f 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -349,7 +349,7 @@ REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
         TRACE("ID=%u, ", pB->wID);
     TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
     if (pB->fMask & RBBIM_COLORS)
-        TRACE(", clrF=0x%06x, clrB=0x%06x", pB->clrFore, pB->clrBack);
+        TRACE(", clrF=%#lx, clrB=%#lx", pB->clrFore, pB->clrBack);
     TRACE("\n");
 
     TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(buff, pB->fMask));
@@ -364,7 +364,7 @@ REBAR_DumpBandInfo(const REBARBANDINFOW *pB)
 	if (pB->fMask & RBBIM_HEADERSIZE)
 	    TRACE(" xHeader=%u", pB->cxHeader);
 	if (pB->fMask & RBBIM_LPARAM)
-	    TRACE(" lParam=0x%08lx", pB->lParam);
+	    TRACE(" lParam %Ix", pB->lParam);
 	TRACE("\n");
     }
     if (pB->fMask & RBBIM_CHILDSIZE)
@@ -382,14 +382,14 @@ REBAR_DumpBand (const REBAR_INFO *iP)
 
     if(! TRACE_ON(rebar) ) return;
 
-    TRACE("hwnd=%p: color=%08x/%08x, bands=%u, rows=%u, cSize=%d,%d\n",
+    TRACE("hwnd=%p: color=%#lx/%#lx, bands=%u, rows=%u, cSize=%ld,%ld\n",
 	  iP->hwndSelf, iP->clrText, iP->clrBk, iP->uNumBands, iP->uNumRows,
 	  iP->calcSize.cx, iP->calcSize.cy);
-    TRACE("hwnd=%p: flags=%08x, dragStart=%d,%d, dragNow=%d,%d, iGrabbedBand=%d\n",
+    TRACE("hwnd=%p: flags=%#x, dragStart=%ld,%ld, dragNow=%ld,%ld, iGrabbedBand=%d\n",
 	  iP->hwndSelf, iP->fStatus, iP->dragStart.x, iP->dragStart.y,
 	  iP->dragNow.x, iP->dragNow.y,
 	  iP->iGrabbedBand);
-    TRACE("hwnd=%p: style=%08x, notify in Unicode=%s, redraw=%s\n",
+    TRACE("hwnd=%p: style=%#lx, notify in Unicode=%s, redraw=%s\n",
           iP->hwndSelf, iP->dwStyle, (iP->bUnicode)?"TRUE":"FALSE",
           (iP->DoRedraw)?"TRUE":"FALSE");
     for (i = 0; i < iP->uNumBands; i++) {
@@ -400,7 +400,7 @@ REBAR_DumpBand (const REBAR_INFO *iP)
 	if (pB->fMask & RBBIM_CHILD)
 	    TRACE(" child=%p", pB->hwndChild);
 	if (pB->fMask & RBBIM_COLORS)
-            TRACE(" clrF=0x%06x clrB=0x%06x", pB->clrFore, pB->clrBack);
+            TRACE(" clrF=%#lx clrB=%#lx", pB->clrFore, pB->clrBack);
 	TRACE("\n");
 	TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(buff, pB->fMask));
 	if (pB->fMask & RBBIM_STYLE)
@@ -413,7 +413,7 @@ REBAR_DumpBand (const REBAR_INFO *iP)
 	    if (pB->fMask & RBBIM_IDEALSIZE)
 		TRACE(" xIdeal=%u", pB->cxIdeal);
 	    if (pB->fMask & RBBIM_LPARAM)
-		TRACE(" lParam=0x%08lx", pB->lParam);
+		TRACE(" lParam %Ix", pB->lParam);
 	}
 	TRACE("\n");
 	if (RBBIM_CHILDSIZE)
@@ -946,7 +946,7 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
     INT xedge = 0, yedge = 0;
     RECT rcSelf;
 
-    TRACE("new size [%d x %d]\n", infoPtr->calcSize.cx, infoPtr->calcSize.cy);
+    TRACE("new size [%ld x %ld]\n", infoPtr->calcSize.cx, infoPtr->calcSize.cy);
 
     if (infoPtr->dwStyle & CCS_NORESIZE)
         return;
@@ -993,8 +993,8 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
 	width = rcSelf.right - rcSelf.left;
     }
 
-    TRACE("hwnd %p, style=%08x, setting at (%d,%d) for (%d,%d)\n",
-	infoPtr->hwndSelf, infoPtr->dwStyle, x, y, width, height);
+    TRACE("hwnd %p, style %#lx, setting at (%d,%d) for (%d,%d)\n", infoPtr->hwndSelf, infoPtr->dwStyle,
+            x, y, width, height);
 
     /* Set flag to ignore next WM_SIZE message and resize the window */
     infoPtr->fStatus |= SELF_RESIZE;
@@ -1059,7 +1059,7 @@ REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus)
 		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,
@@ -1074,7 +1074,7 @@ REBAR_MoveChildWindows (const REBAR_INFO *infoPtr, UINT start, UINT endplus)
 		    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,
@@ -1390,7 +1390,7 @@ REBAR_Layout(REBAR_INFO *infoPtr)
     adjcx = get_rect_cx(infoPtr, &rcAdj);
 
     if (infoPtr->uNumBands == 0) {
-        TRACE("No bands - setting size to (0,%d), style: %x\n", adjcx, infoPtr->dwStyle);
+        TRACE("No bands - setting size to (0,%d), style: %#lx\n", adjcx, infoPtr->dwStyle);
         infoPtr->calcSize.cx = adjcx;
         /* the calcSize.cy won't change for a 0 band rebar */
         infoPtr->uNumRows = 0;
@@ -1434,9 +1434,8 @@ REBAR_Layout(REBAR_INFO *infoPtr)
 
     infoPtr->calcSize.cx = adjcx;
     infoPtr->calcSize.cy = yPos;
-    TRACE("calcsize size=(%d, %d), origheight=(%d,%d)\n",
-            infoPtr->calcSize.cx, infoPtr->calcSize.cy,
-	    oldSize.cx, oldSize.cy);
+    TRACE("calcsize size=(%ld, %ld), origheight=(%ld,%ld)\n", infoPtr->calcSize.cx, infoPtr->calcSize.cy,
+            oldSize.cx, oldSize.cy);
 
     REBAR_DumpBand (infoPtr);
     REBAR_MoveChildWindows (infoPtr, 0, infoPtr->uNumBands);
@@ -1929,7 +1928,7 @@ static LRESULT REBAR_EraseBkGnd (const REBAR_INFO *infoPtr, HDC hdc)
         else
         {
             old = SetBkColor (hdc, new);
-            TRACE("%s background color=0x%06x, band %s\n",
+            TRACE("%s background color %#lx, band %s\n",
                   (lpBand->clrBack == CLR_NONE) ? "none" :
                     ((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
                   GetBkColor(hdc), wine_dbgstr_rect(&rcBand));
@@ -2362,7 +2361,7 @@ REBAR_GetBkColor (const REBAR_INFO *infoPtr)
     if (clr == CLR_DEFAULT)
       clr = infoPtr->clrBtnFace;
 
-    TRACE("background color 0x%06x!\n", clr);
+    TRACE("background color %#lx\n", clr);
 
     return clr;
 }
@@ -2434,7 +2433,7 @@ REBAR_GetRowHeight (const REBAR_INFO *infoPtr, INT iRow)
 static inline LRESULT
 REBAR_GetTextColor (const REBAR_INFO *infoPtr)
 {
-    TRACE("text color 0x%06x!\n", infoPtr->clrText);
+    TRACE("text color %#lx\n", infoPtr->clrText);
 
     return infoPtr->clrText;
 }
@@ -2599,7 +2598,7 @@ REBAR_MaximizeBand (const REBAR_INFO *infoPtr, INT iBand, LPARAM lParam)
         extra = REBAR_ShrinkBandsLTR(infoPtr, next_visible(infoPtr, iBand), iRowEnd, extra, TRUE);
     lpBand->cxEffective += extraOrig - extra;
     lpBand->cx = lpBand->cxEffective;
-    TRACE("(%d, %ld): Wanted size %d, obtained %d (shrink %d, %d)\n", iBand, lParam, cxDesired, lpBand->cx, extraOrig, extra);
+    TRACE("(%d, %Id): Wanted size %d, obtained %d (shrink %d, %d)\n", iBand, lParam, cxDesired, lpBand->cx, extraOrig, extra);
     REBAR_SetRowRectsX(infoPtr, iRowBegin, iRowEnd);
 
     if (infoPtr->dwStyle & CCS_VERT)
@@ -2784,8 +2783,7 @@ REBAR_SetBarInfo (REBAR_INFO *infoPtr, const REBARINFO *lpInfo)
 	    infoPtr->imageSize.cx = 0;
 	    infoPtr->imageSize.cy = 0;
 	}
-	TRACE("new image cx=%d, cy=%d\n", infoPtr->imageSize.cx,
-	      infoPtr->imageSize.cy);
+	TRACE("new image cx=%ld, cy=%ld\n", infoPtr->imageSize.cx, infoPtr->imageSize.cy);
     }
 
     /* revalidate all bands to reset flags for images in headers of bands */
@@ -2806,7 +2804,7 @@ REBAR_SetBkColor (REBAR_INFO *infoPtr, COLORREF clr)
     clrTemp = infoPtr->clrBk;
     infoPtr->clrBk = clr;
 
-    TRACE("background color 0x%06x!\n", infoPtr->clrBk);
+    TRACE("background color %#lx\n", infoPtr->clrBk);
 
     return clrTemp;
 }
@@ -2835,7 +2833,7 @@ REBAR_SetTextColor (REBAR_INFO *infoPtr, COLORREF clr)
     clrTemp = infoPtr->clrText;
     infoPtr->clrText = clr;
 
-    TRACE("text color 0x%06x!\n", infoPtr->clrText);
+    TRACE("text color %#lx\n", infoPtr->clrText);
 
     return clrTemp;
 }
@@ -3309,12 +3307,12 @@ REBAR_NCHitTest (const REBAR_INFO *infoPtr, LPARAM lParam)
     nmmouse.dwItemData = 0;
     nmmouse.pt = clpt;
     nmmouse.dwHitInfo = 0;
-    if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST))) {
-	TRACE("notify changed return value from %ld to %d\n",
-	      ret, i);
-	ret = (LRESULT) i;
+    if ((i = REBAR_Notify((NMHDR *) &nmmouse, infoPtr, NM_NCHITTEST)))
+    {
+        TRACE("notify changed return value from %Id to %d\n", ret, i);
+        ret = (LRESULT) i;
     }
-    TRACE("returning %ld, client point %s\n", ret, wine_dbgstr_point(&clpt));
+    TRACE("returning %Id, client point %s\n", ret, wine_dbgstr_point(&clpt));
     return ret;
 }
 
@@ -3476,13 +3474,12 @@ REBAR_SetRedraw (REBAR_INFO *infoPtr, BOOL redraw)
 static LRESULT
 REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("wParam=%lx, lParam=%lx\n", wParam, lParam);
+    TRACE("wParam %Ix, lParam %Ix\n", wParam, lParam);
 
     /* avoid _Layout resize recursion (but it shouldn't be infinite and it seems Windows does recurse) */
     if (infoPtr->fStatus & SELF_RESIZE) {
 	infoPtr->fStatus &= ~SELF_RESIZE;
-	TRACE("SELF_RESIZE was set, reset, fStatus=%08x lparam=%08lx\n",
-	      infoPtr->fStatus, lParam);
+	TRACE("SELF_RESIZE was set, reset, fStatus=%08x lparam %Ix\n", infoPtr->fStatus, lParam);
 	return 0;
     }
     
@@ -3498,7 +3495,7 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 static LRESULT
 REBAR_StyleChanged (REBAR_INFO *infoPtr, INT nType, const STYLESTRUCT *lpStyle)
 {
-    TRACE("current style=%08x, styleOld=%08x, style being set to=%08x\n",
+    TRACE("current style %#lx, styleOld %#lx, style being set to %#lx\n",
 	  infoPtr->dwStyle, lpStyle->styleOld, lpStyle->styleNew);
     if (nType == GWL_STYLE)
     {
@@ -3538,8 +3535,8 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n",
-	  hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
+
     if (!infoPtr && (uMsg != WM_NCCREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     switch (uMsg)
@@ -3745,8 +3742,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/smoothscroll.c b/dlls/comctl32/smoothscroll.c
index e71fac330e3..75eac1211e2 100644
--- a/dlls/comctl32/smoothscroll.c
+++ b/dlls/comctl32/smoothscroll.c
@@ -112,9 +112,7 @@ BOOL WINAPI SmoothScrollWindow( const SMOOTHSCROLLSTRUCT *smooth ) {
 	   );
    }
 
-   FIXME("(hwnd=%p,flags=%x,x2=%x): should smooth scroll here.\n",
-	   smooth->hwnd,flags,smooth->x2
-   );
+   FIXME("(hwnd=%p,flags=%lx,x2=%lx): should smooth scroll here.\n", smooth->hwnd, flags, smooth->x2);
    /* FIXME: do timer based smooth scrolling */
    if ((smooth->x2 & 1) && smooth->scrollfun)
        return smooth->scrollfun(
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c
index d584b470a8c..7a3ac958111 100644
--- a/dlls/comctl32/static.c
+++ b/dlls/comctl32/static.c
@@ -438,7 +438,7 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
 
         if (style < 0L || style > SS_TYPEMASK)
         {
-            ERR("Unknown style 0x%02x\n", style );
+            ERR("Unknown style %#lx\n", style );
             return -1;
         }
 
@@ -613,7 +613,7 @@ static LRESULT CALLBACK STATIC_WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam,
             lResult = (LRESULT)STATIC_SetIcon( hwnd, (HICON)lParam, full_style );
             break;
         default:
-            FIXME("STM_SETIMAGE: Unhandled type %lx\n", wParam);
+            FIXME("STM_SETIMAGE: Unhandled type %Ix\n", wParam);
             break;
         }
         STATIC_TryPaintFcn( hwnd, full_style );
diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index e804c0418f4..5251f3677b0 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -110,7 +110,7 @@ STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
     margin = (tm.tmInternalLeading ? tm.tmInternalLeading : 2);
     height = max(tm.tmHeight + margin + 2*GetSystemMetrics(SM_CYBORDER), infoPtr->minHeight) + infoPtr->verticalBorder;
 
-    TRACE("    textHeight=%d+%d, final height=%d\n", tm.tmHeight, tm.tmInternalLeading, height);
+    TRACE("    textHeight=%ld+%ld, final height=%d\n", tm.tmHeight, tm.tmInternalLeading, height);
     return height;
 }
 
@@ -542,7 +542,7 @@ STATUSBAR_SetBkColor (STATUS_INFO *infoPtr, COLORREF color)
     infoPtr->clrBk = color;
     InvalidateRect(infoPtr->Self, NULL, FALSE);
 
-    TRACE("CREF: %08x -> %08x\n", oldBkColor, infoPtr->clrBk);
+    TRACE("CREF: %#lx -> %#lx\n", oldBkColor, infoPtr->clrBk);
     return oldBkColor;
 }
 
@@ -1101,7 +1101,7 @@ STATUSBAR_SendMouseNotify(const STATUS_INFO *infoPtr, UINT code, UINT msg, WPARA
 {
     NMMOUSE  nm;
 
-    TRACE("code %04x, lParam=%lx\n", code, lParam);
+    TRACE("code %04x, lParam %Ix\n", code, lParam);
     nm.hdr.hwndFrom = infoPtr->Self;
     nm.hdr.idFrom = GetWindowLongPtrW(infoPtr->Self, GWLP_ID);
     nm.hdr.code = code;
@@ -1128,7 +1128,8 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
     INT nPart = ((INT) wParam) & 0x00ff;
     LRESULT res;
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, msg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, msg, wParam, lParam);
+
     if (!infoPtr && msg != WM_CREATE)
         return DefWindowProcW (hwnd, msg, wParam, lParam);
 
@@ -1267,8 +1268,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((msg >= WM_USER) && (msg < WM_APP) && !COMCTL32_IsReflectedMessage(msg))
-		ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
-		     msg, wParam, lParam);
+		ERR("unknown msg %04x wp=%Ix lp=%Ix\n", msg, wParam, lParam);
 	    return DefWindowProcW (hwnd, msg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c
index 802a8803e82..011c8bdb8b2 100644
--- a/dlls/comctl32/syslink.c
+++ b/dlls/comctl32/syslink.c
@@ -1497,7 +1497,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
 {
     SYSLINK_INFO *infoPtr;
 
-    TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam, lParam);
+    TRACE("hwnd %p, msg %04x, wparam %Ix, lParam %Ix\n", hwnd, message, wParam, lParam);
 
     infoPtr = (SYSLINK_INFO *)GetWindowLongPtrW(hwnd, 0);
 
@@ -1726,7 +1726,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
     default:
         if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message))
         {
-            ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam );
+            ERR("unknown msg %04x, wp %Ix, lp %Ix\n", message, wParam, lParam );
         }
         return DefWindowProcW(hwnd, message, wParam, lParam);
     }
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index 017719a183d..8e34f8b97b3 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -203,9 +203,9 @@ static void
 TAB_DumpItemExternalT(const TCITEMW *pti, UINT iItem, BOOL isW)
 {
     if (TRACE_ON(tab)) {
-	TRACE("external tab %d, mask=0x%08x, dwState=0x%08x, dwStateMask=0x%08x, cchTextMax=0x%08x\n",
+	TRACE("external tab %d, mask=0x%08x, dwState %#lx, dwStateMask %#lx, cchTextMax=0x%08x\n",
 	      iItem, pti->mask, pti->dwState, pti->dwStateMask, pti->cchTextMax);
-	TRACE("external tab %d,   iImage=%d, lParam=0x%08lx, pszTextW=%s\n",
+	TRACE("external tab %d, iImage=%d, lParam %Ix, pszTextW=%s\n",
 	      iItem, pti->iImage, pti->lParam, isW ? debugstr_w(pti->pszText) : debugstr_a((LPSTR)pti->pszText));
     }
 }
@@ -216,10 +216,8 @@ TAB_DumpItemInternal(const TAB_INFO *infoPtr, UINT iItem)
     if (TRACE_ON(tab)) {
 	TAB_ITEM *ti = TAB_GetItem(infoPtr, iItem);
 
-	TRACE("tab %d, dwState=0x%08x, pszText=%s, iImage=%d\n",
-	      iItem, ti->dwState, debugstr_w(ti->pszText), ti->iImage);
-	TRACE("tab %d, rect.left=%d, rect.top(row)=%d\n",
-	      iItem, ti->rect.left, ti->rect.top);
+        TRACE("tab %d, dwState %#lx, pszText %s, iImage %d\n", iItem, ti->dwState, debugstr_w(ti->pszText), ti->iImage);
+        TRACE("tab %d, rect.left=%ld, rect.top(row)=%ld\n", iItem, ti->rect.left, ti->rect.top);
     }
 }
 
@@ -929,8 +927,7 @@ static LRESULT TAB_AdjustRect(const TAB_INFO *infoPtr, WPARAM fLarger, LPRECT pr
 {
     LONG *iRightBottom, *iLeftTop;
 
-    TRACE ("hwnd=%p fLarger=%ld (%s)\n", infoPtr->hwnd, fLarger,
-           wine_dbgstr_rect(prc));
+    TRACE("hwnd %p, fLarger %Id, (%s)\n", infoPtr->hwnd, fLarger, wine_dbgstr_rect(prc));
 
     if (!prc) return -1;
 
@@ -1173,11 +1170,10 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
 	                 ((infoPtr->dwStyle & TCS_BUTTONS) ? 2 : 1) *
                           infoPtr->uVItemPadding;
 
-    TRACE("tabH=%d, tmH=%d, iconh=%d\n",
-	  infoPtr->tabHeight, fontMetrics.tmHeight, icon_height);
+    TRACE("tabH=%d, tmH %ld, iconh %d\n", infoPtr->tabHeight, fontMetrics.tmHeight, icon_height);
   }
 
-  TRACE("client right=%d\n", clientRect.right);
+  TRACE("client right %ld\n", clientRect.right);
 
   /* Get the icon width */
   if (infoPtr->himl)
@@ -1331,7 +1327,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
           curr->rect.right -= curr->rect.left;
           curr->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",
 	      curr->rect.right, curItemLeftPos, clientRect.right,
 	      iCount, iRow, infoPtr->uNumRows, remTab, tabPerRow);
 
@@ -1796,8 +1792,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
 	
       if (center_offset_v < 0)
         center_offset_v = 0;
-	
-      TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%s), textlen=%d\n",
+
+      TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%s), textlen=%ld\n",
 	  debugstr_w(item->pszText), center_offset_h, center_offset_v,
           wine_dbgstr_rect(drawRect), (rcText.right-rcText.left));
 
@@ -1823,8 +1819,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
         drawRect->left += cx + infoPtr->uHItemPadding;
       }
 
-      TRACE("drawing image=%d, left=%d, top=%d\n",
-	    item->iImage, rcImage.left, rcImage.top-1);
+      TRACE("drawing image %d, left %ld, top %ld\n", item->iImage, rcImage.left, rcImage.top-1);
       ImageList_Draw
         (
         infoPtr->himl,
@@ -1914,7 +1909,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
     }
     else
     {
-      TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%s), textlen=%d\n",
+      TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%s), textlen=%ld\n",
 	  debugstr_w(item->pszText), center_offset_h, center_offset_v,
           wine_dbgstr_rect(drawRect), (rcText.right-rcText.left));
       if (item->pszText)
@@ -3240,8 +3235,7 @@ TAB_DeselectAll (TAB_INFO *infoPtr, BOOL excludesel)
 static INT TAB_StyleChanged(TAB_INFO *infoPtr, WPARAM wStyleType,
                             const STYLESTRUCT *lpss)
 {
-    TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
-          wStyleType, lpss->styleOld, lpss->styleNew);
+    TRACE("style type %Ix, styleOld %#lx, styleNew %#lx\n", wStyleType, lpss->styleOld, lpss->styleNew);
 
     if (wStyleType != GWL_STYLE) return 0;
 
@@ -3258,7 +3252,8 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
 
-    TRACE("hwnd=%p msg=%x wParam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wParam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
+
     if (!infoPtr && (uMsg != WM_CREATE))
       return DefWindowProcW (hwnd, uMsg, wParam, lParam);
 
@@ -3425,8 +3420,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
     default:
       if (uMsg >= WM_USER && uMsg < WM_APP && !COMCTL32_IsReflectedMessage(uMsg))
-	WARN("unknown msg %04x wp=%08lx lp=%08lx\n",
-	     uMsg, wParam, lParam);
+          WARN("unknown msg %04x wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
       break;
     }
     return DefWindowProcW(hwnd, uMsg, wParam, lParam);
diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c
index 4523695d614..6682b399946 100644
--- a/dlls/comctl32/taskdialog.c
+++ b/dlls/comctl32/taskdialog.c
@@ -1210,7 +1210,7 @@ static INT_PTR CALLBACK taskdialog_proc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
     struct taskdialog_info *dialog_info;
     LRESULT result;
 
-    TRACE("hwnd=%p msg=0x%04x wparam=%lx lparam=%lx\n", hwnd, msg, wParam, lParam);
+    TRACE("hwnd %p, msg 0x%04x, wparam %Ix, lparam %Ix\n", hwnd, msg, wParam, lParam);
 
     if (msg != WM_INITDIALOG)
         dialog_info = GetPropW(hwnd, taskdialog_info_propnameW);
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 2ae70ad4f3e..9b059996b65 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -292,36 +292,29 @@ TOOLBAR_DumpTBButton(const TBBUTTON *tbb, BOOL fUnicode)
 static void
 TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_num)
 {
-    if (TRACE_ON(toolbar)){
-        TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx, stringid=0x%08lx\n",
-              btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap), 
-              bP->fsState, bP->fsStyle, bP->dwData, bP->iString);
-	TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP)));
-        TRACE("button %d id %d, hot=%s, row=%d, rect=(%s)\n",
-              btn_num, bP->idCommand, (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
-              wine_dbgstr_rect(&bP->rect));
-    }
+    TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%Ix, stringid=%Ix\n",
+            btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap), bP->fsState, bP->fsStyle, bP->dwData, bP->iString);
+    TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP)));
+    TRACE("button %d id %d, hot=%s, row=%d, rect=(%s)\n", btn_num, bP->idCommand, (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
+            wine_dbgstr_rect(&bP->rect));
 }
 
 
 static void
 TOOLBAR_DumpToolbar(const TOOLBAR_INFO *iP, INT line)
 {
-    if (TRACE_ON(toolbar)) {
-	INT i;
-
-	TRACE("toolbar %p at line %d, exStyle=%08x, buttons=%d, bitmaps=%d, strings=%d, style=%08x\n",
-	      iP->hwndSelf, line,
-	      iP->dwExStyle, iP->nNumButtons, iP->nNumBitmaps,
-	      iP->nNumStrings, iP->dwStyle);
-	TRACE("toolbar %p at line %d, himlInt=%p, himlDef=%p, himlHot=%p, himlDis=%p, redrawable=%s\n",
-	      iP->hwndSelf, line,
-	      iP->himlInt, iP->himlDef, iP->himlHot, iP->himlDis,
-	      (iP->bDoRedraw) ? "TRUE" : "FALSE");
- 	for(i=0; i<iP->nNumButtons; i++) {
-            TOOLBAR_DumpButton(iP, &iP->buttons[i], i);
-	}
-    }
+    INT i;
+
+    if (!TRACE_ON(toolbar))
+        return;
+
+    TRACE("toolbar %p at line %d, exStyle=%#lx, buttons=%d, bitmaps=%d, strings=%d, style=%#lx\n",
+            iP->hwndSelf, line, iP->dwExStyle, iP->nNumButtons, iP->nNumBitmaps, iP->nNumStrings, iP->dwStyle);
+    TRACE("toolbar %p at line %d, himlInt=%p, himlDef=%p, himlHot=%p, himlDis=%p, redrawable=%s\n",
+            iP->hwndSelf, line, iP->himlInt, iP->himlDef, iP->himlHot, iP->himlDis, (iP->bDoRedraw) ? "TRUE" : "FALSE");
+
+    for (i = 0; i < iP->nNumButtons; ++i)
+        TOOLBAR_DumpButton(iP, &iP->buttons[i], i);
 }
 
 static inline BOOL
@@ -419,7 +412,7 @@ TOOLBAR_GetBitmapIndex(const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
         if (nmgd.dwMask & TBNF_DI_SETITEM)
             btnPtr->iBitmap = nmgd.iImage;
         ret = nmgd.iImage;
-        TRACE("TBN_GETDISPINFO returned bitmap id %d, mask=%08x, nNumBitmaps=%d\n",
+        TRACE("TBN_GETDISPINFO returned bitmap id %d, mask %#lx, nNumBitmaps %d\n",
             ret, nmgd.dwMask, infoPtr->nNumBitmaps);
     }
 
@@ -976,11 +969,10 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
 
     rcBitmap.top += infoPtr->szPadding.cy / 2;
 
-    TRACE("iBitmap=%d, start=(%d,%d) w=%d, h=%d\n",
-      btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
+    TRACE("iBitmap=%d, start=(%ld,%ld) w=%d, h=%d\n", btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
       infoPtr->nBitmapWidth, infoPtr->nBitmapHeight);
     TRACE("Text=%s\n", debugstr_w(lpText));
-    TRACE("iListGap=%d, padding = { %d, %d }\n", infoPtr->iListGap, infoPtr->szPadding.cx, infoPtr->szPadding.cy);
+    TRACE("iListGap=%d, padding = { %ld, %ld }\n", infoPtr->iListGap, infoPtr->szPadding.cx, infoPtr->szPadding.cy);
 
     /* calculate text position */
     if (lpText)
@@ -1270,7 +1262,7 @@ TOOLBAR_MeasureString(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *btnPtr,
 	}
     }
 
-    TRACE("string size %d x %d!\n", lpSize->cx, lpSize->cy);
+    TRACE("string size %ld x %ld.\n", lpSize->cx, lpSize->cy);
 }
 
 /***********************************************************************
@@ -1320,7 +1312,7 @@ TOOLBAR_CalcStrings (const TOOLBAR_INFO *infoPtr, LPSIZE lpSize)
     SelectObject (hdc, hOldFont);
     ReleaseDC (infoPtr->hwndSelf, hdc);
 
-    TRACE("max string size %d x %d\n", lpSize->cx, lpSize->cy);
+    TRACE("max string size %ld x %ld\n", lpSize->cx, lpSize->cy);
 }
 
 /***********************************************************************
@@ -2438,7 +2430,7 @@ TOOLBAR_CustomizeDialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
                     if (!TOOLBAR_GetButtonInfo(infoPtr, &nmtb))
 			break;
 
-		    TRACE("WM_INITDIALOG style: %x iItem(%d) idCommand(%d) iString(%ld) %s\n",
+		    TRACE("WM_INITDIALOG style: %x iItem(%d) idCommand(%d) iString(%Id) %s\n",
                         nmtb.tbButton.fsStyle, i, 
                         nmtb.tbButton.idCommand,
                         nmtb.tbButton.iString,
@@ -2865,7 +2857,7 @@ TOOLBAR_AddBitmap (TOOLBAR_INFO *infoPtr, INT count, const TBADDBITMAP *lpAddBmp
 	        info.nID = IDB_HIST_LARGE;
 	        break;
 	    default:
-                WARN("unknown bitmap id, %ld\n", lpAddBmp->nID);
+                WARN("unknown bitmap id, %Id\n", lpAddBmp->nID);
 	        return -1;
 	}
 
@@ -2951,7 +2943,7 @@ TOOLBAR_AddStringW (TOOLBAR_INFO *infoPtr, HINSTANCE hInstance, LPARAM lParam)
     BOOL fFirstString = (infoPtr->nNumStrings == 0);
     INT nIndex = infoPtr->nNumStrings;
 
-    TRACE("%p, %lx\n", hInstance, lParam);
+    TRACE("%p, %Ix\n", hInstance, lParam);
 
     if (IS_INTRESOURCE(lParam)) {
 	WCHAR szString[MAX_RESOURCE_STRING_LENGTH];
@@ -3033,7 +3025,7 @@ TOOLBAR_AddStringA (TOOLBAR_INFO *infoPtr, HINSTANCE hInstance, LPARAM lParam)
     INT nIndex;
     INT len;
 
-    TRACE("%p, %lx\n", hInstance, lParam);
+    TRACE("%p, %Ix\n", hInstance, lParam);
 
     if (IS_INTRESOURCE(lParam))  /* load from resources */
         return TOOLBAR_AddStringW(infoPtr, hInstance, lParam);
@@ -3064,7 +3056,7 @@ TOOLBAR_AddStringA (TOOLBAR_INFO *infoPtr, HINSTANCE hInstance, LPARAM lParam)
 static LRESULT
 TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr)
 {
-    TRACE("auto sizing, style=%#x\n", infoPtr->dwStyle);
+    TRACE("auto sizing, style=%#lx\n", infoPtr->dwStyle);
     TRACE("nRows: %d, infoPtr->nButtonHeight: %d\n", infoPtr->nRows, infoPtr->nButtonHeight);
 
     if (!(infoPtr->dwStyle & CCS_NORESIZE))
@@ -3175,7 +3167,7 @@ TOOLBAR_CheckButton (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
 
     nIndex = TOOLBAR_GetButtonIndex (infoPtr, Id, FALSE);
 
-    TRACE("hwnd=%p, btn index=%d, lParam=0x%08lx\n", infoPtr->hwndSelf, nIndex, lParam);
+    TRACE("hwnd %p, btn index %d, lParam %Ix\n", infoPtr->hwndSelf, nIndex, lParam);
 
     if (nIndex == -1)
 	return FALSE;
@@ -3307,7 +3299,7 @@ TOOLBAR_EnableButton (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
 
     nIndex = TOOLBAR_GetButtonIndex (infoPtr, Id, FALSE);
 
-    TRACE("hwnd=%p, btn id=%d, lParam=0x%08lx\n", infoPtr->hwndSelf, Id, lParam);
+    TRACE("hwnd %p, btn id %d, lParam %Ix\n", infoPtr->hwndSelf, Id, lParam);
 
     if (nIndex == -1)
 	return FALSE;
@@ -3479,7 +3471,7 @@ TOOLBAR_GetButtonText (const TOOLBAR_INFO *infoPtr, INT Id, LPWSTR lpStr, BOOL i
 static LRESULT
 TOOLBAR_GetDisabledImageList (const TOOLBAR_INFO *infoPtr, WPARAM wParam)
 {
-    TRACE("hwnd=%p, wParam=%ld\n", infoPtr->hwndSelf, wParam);
+    TRACE("hwnd %p, wParam %Id\n", infoPtr->hwndSelf, wParam);
     /* UNDOCUMENTED: wParam is actually the ID of the image list to return */
     return (LRESULT)GETDISIMAGELIST(infoPtr, wParam);
 }
@@ -3497,7 +3489,7 @@ TOOLBAR_GetExtendedStyle (const TOOLBAR_INFO *infoPtr)
 static LRESULT
 TOOLBAR_GetHotImageList (const TOOLBAR_INFO *infoPtr, WPARAM wParam)
 {
-    TRACE("hwnd=%p, wParam=%ld\n", infoPtr->hwndSelf, wParam);
+    TRACE("hwnd %p, wParam %Id\n", infoPtr->hwndSelf, wParam);
     /* UNDOCUMENTED: wParam is actually the ID of the image list to return */
     return (LRESULT)GETHOTIMAGELIST(infoPtr, wParam);
 }
@@ -3519,7 +3511,7 @@ TOOLBAR_GetHotItem (const TOOLBAR_INFO *infoPtr)
 static LRESULT
 TOOLBAR_GetDefImageList (const TOOLBAR_INFO *infoPtr, WPARAM wParam)
 {
-    TRACE("hwnd=%p, wParam=%ld\n", infoPtr->hwndSelf, wParam);
+    TRACE("hwnd %p, wParam %Id\n", infoPtr->hwndSelf, wParam);
     /* UNDOCUMENTED: wParam is actually the ID of the image list to return */
     return (LRESULT) GETDEFIMAGELIST(infoPtr, wParam);
 }
@@ -3577,9 +3569,8 @@ TOOLBAR_GetMaxSize (const TOOLBAR_INFO *infoPtr, LPSIZE lpSize)
     lpSize->cx = infoPtr->rcBound.right - infoPtr->rcBound.left;
     lpSize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
 
-    TRACE("maximum size %d x %d\n",
-	   infoPtr->rcBound.right - infoPtr->rcBound.left,
-	   infoPtr->rcBound.bottom - infoPtr->rcBound.top);
+    TRACE("maximum size %ld x %ld\n", infoPtr->rcBound.right - infoPtr->rcBound.left,
+            infoPtr->rcBound.bottom - infoPtr->rcBound.top);
 
     return TRUE;
 }
@@ -3856,7 +3847,7 @@ TOOLBAR_LoadImages (TOOLBAR_INFO *infoPtr, WPARAM wParam, HINSTANCE hInstance)
     tbab.hInst = hInstance;
     tbab.nID = wParam;
 
-    TRACE("hwnd = %p, hInst = %p, nID = %lu\n", infoPtr->hwndSelf, tbab.hInst, tbab.nID);
+    TRACE("hwnd = %p, hInst = %p, nID = %Iu\n", infoPtr->hwndSelf, tbab.hInst, tbab.nID);
 
     return TOOLBAR_AddBitmap(infoPtr, 0, &tbab);
 }
@@ -4036,7 +4027,7 @@ TOOLBAR_ReplaceBitmap (TOOLBAR_INFO *infoPtr, const TBREPLACEBITMAP *lpReplace)
     int nOldBitmaps, nNewBitmaps = 0;
     HIMAGELIST himlDef = 0;
 
-    TRACE("hInstOld %p nIDOld %lx hInstNew %p nIDNew %lx nButtons %x\n",
+    TRACE("hInstOld %p nIDOld %Ix hInstNew %p nIDNew %Ix nButtons %x\n",
           lpReplace->hInstOld, lpReplace->nIDOld, lpReplace->hInstNew, lpReplace->nIDNew,
           lpReplace->nButtons);
 
@@ -4048,7 +4039,7 @@ TOOLBAR_ReplaceBitmap (TOOLBAR_INFO *infoPtr, const TBREPLACEBITMAP *lpReplace)
     else if (lpReplace->hInstOld != 0 && lpReplace->hInstOld != lpReplace->hInstNew)
         FIXME("resources not in the current module not implemented\n");
 
-    TRACE("To be replaced hInstOld %p nIDOld %lx\n", lpReplace->hInstOld, lpReplace->nIDOld);
+    TRACE("To be replaced hInstOld %p nIDOld %Ix\n", lpReplace->hInstOld, lpReplace->nIDOld);
     for (i = 0; i < infoPtr->nNumBitmapInfos; i++) {
         TBITMAP_INFO *tbi = &infoPtr->bitmaps[i];
         TRACE("tbimapinfo %d hInstOld %p nIDOld %x\n", i, tbi->hInst, tbi->nID);
@@ -4067,7 +4058,7 @@ TOOLBAR_ReplaceBitmap (TOOLBAR_INFO *infoPtr, const TBREPLACEBITMAP *lpReplace)
 
     if (nOldButtons == 0)
     {
-        WARN("No hinst/bitmap found! hInst %p nID %lx\n", lpReplace->hInstOld, lpReplace->nIDOld);
+        WARN("No hinst/bitmap found! hInst %p nID %Ix\n", lpReplace->hInstOld, lpReplace->nIDOld);
         return FALSE;
     }
     
@@ -4381,10 +4372,10 @@ TOOLBAR_SetBitmapSize (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
     short width = (short)LOWORD(lParam);
     short height = (short)HIWORD(lParam);
 
-    TRACE("hwnd=%p, wParam=%ld, size %d x %d\n", infoPtr->hwndSelf, wParam, width, height);
+    TRACE("hwnd %p, wParam %Id, size %d x %d\n", infoPtr->hwndSelf, wParam, width, height);
 
     if (wParam != 0)
-        FIXME("wParam is %ld. Perhaps image list index?\n", wParam);
+        FIXME("wParam is %Id. Perhaps image list index?\n", wParam);
 
     /* 0 width or height is changed to 1 */
     if (width == 0)
@@ -4479,7 +4470,7 @@ TOOLBAR_SetButtonSize (TOOLBAR_INFO *infoPtr, LPARAM lParam)
 
     if ((cx < 0) || (cy < 0))
     {
-        ERR("invalid parameter 0x%08x\n", (DWORD)lParam);
+        ERR("invalid parameter %#Ix\n", lParam);
         return FALSE;
     }
 
@@ -4586,7 +4577,7 @@ TOOLBAR_SetDrawTextFlags (TOOLBAR_INFO *infoPtr, DWORD mask, DWORD flags)
 {
     DWORD old_flags;
 
-    TRACE("hwnd = %p, mask = 0x%08x, flags = 0x%08x\n", infoPtr->hwndSelf, mask, flags);
+    TRACE("hwnd = %p, mask = %#lx, flags %#lx\n", infoPtr->hwndSelf, mask, flags);
 
     old_flags = infoPtr->dwDTFlags;
     infoPtr->dwDTFlags = (old_flags & ~mask) | (flags & mask);
@@ -4605,7 +4596,7 @@ TOOLBAR_SetExtendedStyle (TOOLBAR_INFO *infoPtr, DWORD mask, DWORD style)
 {
     DWORD old_style = infoPtr->dwExStyle;
 
-    TRACE("mask=0x%08x, style=0x%08x\n", mask, style);
+    TRACE("mask %#lx, style %#lx\n", mask, style);
 
     if (mask)
 	infoPtr->dwExStyle = (old_style & ~mask) | (style & mask);
@@ -4613,8 +4604,7 @@ TOOLBAR_SetExtendedStyle (TOOLBAR_INFO *infoPtr, DWORD mask, DWORD style)
 	infoPtr->dwExStyle = style;
 
     if (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL)
-	FIXME("Unknown Toolbar Extended Style 0x%08x. Please report.\n",
-	      (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL));
+        FIXME("Unknown Toolbar Extended Style %#lx. Please report.\n", (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL));
 
     if ((old_style ^ infoPtr->dwExStyle) & TBSTYLE_EX_MIXEDBUTTONS)
         TOOLBAR_CalcToolbar(infoPtr);
@@ -4794,11 +4784,11 @@ TOOLBAR_SetIndent (TOOLBAR_INFO *infoPtr, INT nIndent)
 static LRESULT
 TOOLBAR_SetInsertMark (TOOLBAR_INFO *infoPtr, const TBINSERTMARK *lptbim)
 {
-    TRACE("hwnd = %p, lptbim = { %d, 0x%08x}\n", infoPtr->hwndSelf, lptbim->iButton, lptbim->dwFlags);
+    TRACE("hwnd = %p, lptbim = { %d, %#lx}\n", infoPtr->hwndSelf, lptbim->iButton, lptbim->dwFlags);
 
     if ((lptbim->dwFlags & ~TBIMHT_AFTER) != 0)
     {
-        FIXME("Unrecognized flag(s): 0x%08x\n", (lptbim->dwFlags & ~TBIMHT_AFTER));
+        FIXME("Unrecognized flag(s): %#lx\n", (lptbim->dwFlags & ~TBIMHT_AFTER));
         return 0;
     }
 
@@ -4858,8 +4848,7 @@ TOOLBAR_SetPadding (TOOLBAR_INFO *infoPtr, LPARAM lParam)
     oldPad = MAKELONG(infoPtr->szPadding.cx, infoPtr->szPadding.cy);
     infoPtr->szPadding.cx = min(LOWORD((DWORD)lParam), GetSystemMetrics(SM_CXEDGE));
     infoPtr->szPadding.cy = min(HIWORD((DWORD)lParam), GetSystemMetrics(SM_CYEDGE));
-    TRACE("cx=%d, cy=%d\n",
-	  infoPtr->szPadding.cx, infoPtr->szPadding.cy);
+    TRACE("cx %ld, cy %ld\n", infoPtr->szPadding.cx, infoPtr->szPadding.cy);
     return (LRESULT) oldPad;
 }
 
@@ -5041,7 +5030,7 @@ TOOLBAR_SetStyle (TOOLBAR_INFO *infoPtr, DWORD style)
 {
     DWORD dwOldStyle = infoPtr->dwStyle;
 
-    TRACE("new style 0x%08x\n", style);
+    TRACE("new style %#lx\n", style);
 
     if (style & TBSTYLE_LIST)
         infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS;
@@ -5111,7 +5100,7 @@ TOOLBAR_GetColorScheme (const TOOLBAR_INFO *infoPtr, LPCOLORSCHEME lParam)
 static LRESULT
 TOOLBAR_SetColorScheme (TOOLBAR_INFO *infoPtr, const COLORSCHEME *lParam)
 {
-    TRACE("new colors Hl=%x Shd=%x, old colors Hl=%x Shd=%x\n",
+    TRACE("new colors Hl=%#lx Shd=%#lx, old colors Hl=%#lx Shd=%#lx\n",
 	  lParam->clrBtnHighlight, lParam->clrBtnShadow,
 	  infoPtr->clrBtnHighlight, infoPtr->clrBtnShadow);
 
@@ -5190,7 +5179,7 @@ TOOLBAR_GetStringW (const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPWSTR str)
 static LRESULT TOOLBAR_SetBoundingSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     SIZE * pSize = (SIZE*)lParam;
-    FIXME("hwnd=%p, wParam=0x%08lx, size.cx=%d, size.cy=%d stub\n", hwnd, wParam, pSize->cx, pSize->cy);
+    FIXME("hwnd=%p, wParam=%Ix, size.cx=%ld, size.cy=%ld stub\n", hwnd, wParam, pSize->cx, pSize->cy);
     return 0;
 }
 
@@ -5202,8 +5191,7 @@ TOOLBAR_SetHotItem2 (TOOLBAR_INFO *infoPtr, INT nHotItem, LPARAM lParam)
 {
     INT nOldHotItem = infoPtr->nHotItem;
 
-    TRACE("old item=%d, new item=%d, flags=%08x\n",
-	  nOldHotItem, nHotItem, (DWORD)lParam);
+    TRACE("old item %d, new item %d, flags %Ix\n", nOldHotItem, nHotItem, lParam);
 
     if (nHotItem < 0 || nHotItem > infoPtr->nNumButtons)
         nHotItem = -1;
@@ -5254,8 +5242,7 @@ TOOLBAR_GetIdealSize (const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
      *   lParam    pointer to SIZE structure
      *
      */
-    TRACE("wParam %ld, lParam 0x%08lx -> 0x%08x 0x%08x\n",
-	  wParam, lParam, lpsize->cx, lpsize->cy);
+    TRACE("wParam %Id, lParam %Ix -> %lx, %lx\n", wParam, lParam, lpsize->cx, lpsize->cy);
 
     switch(wParam) {
     case 0:
@@ -5280,17 +5267,16 @@ TOOLBAR_GetIdealSize (const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 	lpsize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
 	break;
     default:
-	FIXME("Unknown wParam %ld\n", wParam);
+	FIXME("Unknown wParam %Id\n", wParam);
 	return 0;
     }
-    TRACE("set to -> 0x%08x 0x%08x\n",
-	  lpsize->cx, lpsize->cy);
+    TRACE("set to -> %lu, %lu\n", lpsize->cx, lpsize->cy);
     return 1;
 }
 
 static LRESULT TOOLBAR_Unkwn464(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-    FIXME("hwnd=%p wParam %08lx lParam %08lx\n", hwnd, wParam, lParam);
+    FIXME("hwnd %p, wParam %Ix, lParam %Ix\n", hwnd, wParam, lParam);
 
     InvalidateRect(hwnd, NULL, TRUE);
     return 1;
@@ -5303,7 +5289,7 @@ TOOLBAR_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
     TOOLBAR_INFO *infoPtr = (TOOLBAR_INFO *)GetWindowLongPtrW(hwnd, 0);
     LOGFONTW logFont;
 
-    TRACE("hwnd = %p, style=0x%08x\n", hwnd, lpcs->style);
+    TRACE("hwnd = %p, style = %#lx\n", hwnd, lpcs->style);
 
     infoPtr->dwStyle = GetWindowLongW(hwnd, GWL_STYLE);
     GetClientRect(hwnd, &infoPtr->client_rect);
@@ -5395,7 +5381,7 @@ TOOLBAR_EraseBackground (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 	    case CDRF_SKIPDEFAULT:
 		return TRUE;
 	    default:
-		FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_PREERASE)\n",
+		FIXME("[%p] response %ld not handled to NM_CUSTOMDRAW (CDDS_PREERASE)\n",
 		      infoPtr->hwndSelf, ntfret);
 	    }
     }
@@ -5432,7 +5418,7 @@ TOOLBAR_EraseBackground (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 	    case CDRF_SKIPDEFAULT:
 		return TRUE;
 	    default:
-		FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)\n",
+		FIXME("[%p] response %ld not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)\n",
 		      infoPtr->hwndSelf, ntfret);
 	    }
     }
@@ -5605,7 +5591,7 @@ TOOLBAR_LButtonDown (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
                 nmtb.iItem = btnPtr->idCommand;
                 nmtb.rcButton = btnPtr->rect;
                 res = TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr, TBN_DROPDOWN);
-                TRACE("TBN_DROPDOWN responded with %ld\n", res);
+                TRACE("TBN_DROPDOWN responded with %Id\n", res);
 
                 if (res != TBDDRET_TREATPRESSED)
                 {
@@ -6381,7 +6367,7 @@ TOOLBAR_NotifyFormat(const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
     LRESULT format;
 
-    TRACE("wParam = 0x%lx, lParam = 0x%08lx\n", wParam, lParam);
+    TRACE("wParam %Ix, lParam %Ix\n", wParam, lParam);
 
     if (lParam == NF_QUERY)
         return NFR_UNICODE;
@@ -6390,8 +6376,7 @@ TOOLBAR_NotifyFormat(const TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 	format = SendMessageW(infoPtr->hwndNotify,
 			 WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
 	if ((format != NFR_ANSI) && (format != NFR_UNICODE)) {
-	    ERR("wrong response to WM_NOTIFYFORMAT (%ld), assuming ANSI\n",
-		format);
+	    ERR("wrong response to WM_NOTIFYFORMAT (%Id), assuming ANSI\n", format);
 	    format = NFR_ANSI;
 	}
 	return format;
@@ -6561,8 +6546,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = (TOOLBAR_INFO *)GetWindowLongPtrW(hwnd, 0);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n",
-	  hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_NCCREATE))
 	return DefWindowProcW( hwnd, uMsg, wParam, lParam );
@@ -6958,8 +6942,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 2a68beafd7d..95ef8da6794 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -228,7 +228,7 @@ TOOLTIPS_notify_customdraw (DWORD dwDrawStage, NMTTCUSTOMDRAW *lpnmttcd)
     LRESULT result;
     lpnmttcd->nmcd.dwDrawStage = dwDrawStage;
 
-    TRACE("Notifying stage %d, flags %x, id %x\n", lpnmttcd->nmcd.dwDrawStage,
+    TRACE("Notifying stage %ld, flags %x, id %x\n", lpnmttcd->nmcd.dwDrawStage,
           lpnmttcd->uDrawFlags, lpnmttcd->nmcd.hdr.code);
 
     result = SendMessageW(GetParent(lpnmttcd->nmcd.hdr.hwndFrom), WM_NOTIFY,
@@ -370,7 +370,7 @@ static void TOOLTIPS_GetDispInfoA(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *too
     ttnmdi.uFlags = toolPtr->uFlags;
     ttnmdi.lParam = toolPtr->lParam;
 
-    TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
+    TRACE("hdr.idFrom = %Ix\n", ttnmdi.hdr.idFrom);
     SendMessageW(toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
 
     if (IS_INTRESOURCE(ttnmdi.lpszText)) {
@@ -426,7 +426,7 @@ static void TOOLTIPS_GetDispInfoW(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *too
     ttnmdi.uFlags = toolPtr->uFlags;
     ttnmdi.lParam = toolPtr->lParam;
 
-    TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
+    TRACE("hdr.idFrom = %Ix\n", ttnmdi.hdr.idFrom);
     SendMessageW(toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
 
     if (IS_INTRESOURCE(ttnmdi.lpszText)) {
@@ -616,7 +616,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
     toolPtr = &infoPtr->tools[nTool];
     TOOLTIPS_CalcTipSize (infoPtr, &size);
 
-    TRACE("Show tooltip %d, %s, size %d x %d\n", nTool, debugstr_w(infoPtr->szTipText),
+    TRACE("Show tooltip %d, %s, size %ld x %ld\n", nTool, debugstr_w(infoPtr->szTipText),
         size.cx, size.cy);
 
     if (track_activate && (toolPtr->uFlags & TTF_TRACK))
@@ -720,7 +720,7 @@ TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
         }
     }
 
-    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;
@@ -1045,7 +1045,7 @@ TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 
     if (!ti) return FALSE;
 
-    TRACE("add tool (%p) %p %ld%s\n", infoPtr->hwndSelf, ti->hwnd, ti->uId,
+    TRACE("add tool (%p) %p %Id%s\n", infoPtr->hwndSelf, ti->hwnd, ti->uId,
         (ti->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : "");
 
     if (ti->cbSize > TTTOOLINFOW_V3_SIZE && isW)
@@ -1285,7 +1285,7 @@ TOOLTIPS_GetBubbleSize (const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolI
     TRACE("tool %d\n", nTool);
 
     TOOLTIPS_CalcTipSize (infoPtr, &size);
-    TRACE("size %d x %d\n", size.cx, size.cy);
+    TRACE("size %ld x %ld\n", size.cx, size.cy);
 
     return MAKELRESULT(size.cx, size.cy);
 }
@@ -1320,7 +1320,7 @@ TOOLTIPS_GetDelayTime (const TOOLTIPS_INFO *infoPtr, DWORD duration)
         return infoPtr->nInitialTime;
 
     default:
-        WARN("Invalid duration flag %x\n", duration);
+        WARN("Invalid duration flag %lx\n", duration);
 	break;
     }
 
@@ -1577,7 +1577,7 @@ TOOLTIPS_SetDelayTime (TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime)
 	    break;
 
     default:
-        WARN("Invalid duration flag %x\n", duration);
+        WARN("Invalid duration flag %lx\n", duration);
 	break;
     }
 
@@ -1924,7 +1924,7 @@ TOOLTIPS_NCHitTest (const TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 static LRESULT
 TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
-    FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", infoPtr->hwndSelf, wParam, lParam);
+    FIXME("hwnd %p, wParam %Ix, lParam %Ix\n", infoPtr->hwndSelf, wParam, lParam);
 
     return 0;
 }
@@ -2102,7 +2102,8 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
+
     if (!infoPtr && (uMsg != WM_CREATE) && (uMsg != WM_NCCREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     switch (uMsg)
@@ -2270,8 +2271,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
 	default:
 	    if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-		ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
-		     uMsg, wParam, lParam);
+		ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
 	    return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c
index ce6a20c6c63..6643752c043 100644
--- a/dlls/comctl32/trackbar.c
+++ b/dlls/comctl32/trackbar.c
@@ -118,7 +118,7 @@ static LRESULT notify_hdr (const TRACKBAR_INFO *infoPtr, INT code, LPNMHDR pnmh)
     pnmh->code = code;
     result = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, pnmh->idFrom, (LPARAM)pnmh);
 
-    TRACE("  <= %ld\n", result);
+    TRACE("  <= %Id\n", result);
 
     return result;
 }
@@ -443,7 +443,7 @@ TRACKBAR_AutoPage (TRACKBAR_INFO *infoPtr, POINT clickPoint)
     LONG dir = TRACKBAR_GetAutoPageDirection(infoPtr, clickPoint);
     LONG prevPos = infoPtr->lPos;
 
-    TRACE("clickPoint=%s, dir=%d\n", wine_dbgstr_point(&clickPoint), dir);
+    TRACE("clickPoint=%s, dir=%ld\n", wine_dbgstr_point(&clickPoint), dir);
 
     if (dir > 0 && (infoPtr->flags & TB_AUTO_PAGE_RIGHT))
 	TRACKBAR_PageDown(infoPtr);
@@ -1127,7 +1127,6 @@ static int __cdecl comp_tics (const void *ap, const void *bp)
     const DWORD a = *(const DWORD *)ap;
     const DWORD b = *(const DWORD *)bp;
 
-    TRACE("(a=%d, b=%d)\n", a, b);
     if (a < b) return -1;
     if (a > b) return 1;
     return 0;
@@ -1407,7 +1406,7 @@ TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos)
     if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax))
         return FALSE;
 
-    TRACE("lPos=%d\n", lPos);
+    TRACE("position %ld\n", lPos);
 
     infoPtr->uNumTics++;
     infoPtr->tics=ReAlloc( infoPtr->tics,
@@ -1885,7 +1884,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TRACKBAR_INFO *infoPtr = (TRACKBAR_INFO *)GetWindowLongPtrW (hwnd, 0);
 
-    TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %x, wparam %Ix, lparam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (!infoPtr && (uMsg != WM_CREATE))
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -2064,7 +2063,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
     default:
         if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-            ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+            ERR("unknown msg %04x, wp %Ix, lp %Ix\n", uMsg, wParam, lParam);
         return DefWindowProcW (hwnd, uMsg, wParam, lParam);
     }
 }
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 1368105f271..608ce489e33 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -624,7 +624,7 @@ TREEVIEW_SendCustomDrawNotify(const TREEVIEW_INFO *infoPtr, DWORD dwDrawStage,
     NMTVCUSTOMDRAW nmcdhdr;
     NMCUSTOMDRAW *nmcd;
 
-    TRACE("drawstage:0x%x hdc:%p\n", dwDrawStage, hdc);
+    TRACE("drawstage %#lx, hdc %p\n", dwDrawStage, hdc);
 
     nmcd = &nmcdhdr.nmcd;
     nmcd->dwDrawStage = dwDrawStage;
@@ -671,7 +671,7 @@ TREEVIEW_SendCustomDrawItemNotify(const TREEVIEW_INFO *infoPtr, HDC hdc,
     nmcd->lItemlParam = item->lParam;
     nmcdhdr->iLevel = item->iLevel;
 
-    TRACE("drawstage:0x%x hdc:%p item:%lx, itemstate:0x%x, lItemlParam:0x%lx\n",
+    TRACE("drawstage %#lx hdc:%p item:%Ix, itemstate:0x%x, lItemlParam:%Ix\n",
 	  nmcd->dwDrawStage, nmcd->hdc, nmcd->dwItemSpec,
 	  nmcd->uItemState, nmcd->lItemlParam);
 
@@ -2005,7 +2005,7 @@ TREEVIEW_SetInsertMarkColor(TREEVIEW_INFO *infoPtr, COLORREF color)
 {
     COLORREF prevColor = infoPtr->clrInsertMark;
 
-    TRACE("0x%08x\n", color);
+    TRACE("%#lx\n", color);
     infoPtr->clrInsertMark = color;
 
     return (LRESULT)prevColor;
@@ -2079,7 +2079,7 @@ static inline LRESULT
 TREEVIEW_GetVisibleCount(const TREEVIEW_INFO *infoPtr)
 {
     /* Surprise! This does not take integral height into account. */
-    TRACE("client=%d, item=%d\n", infoPtr->clientHeight, infoPtr->uItemHeight);
+    TRACE("client=%ld, item=%d\n", infoPtr->clientHeight, infoPtr->uItemHeight);
     return infoPtr->clientHeight / infoPtr->uItemHeight;
 }
 
@@ -3113,7 +3113,7 @@ TREEVIEW_Paint(TREEVIEW_INFO *infoPtr, HDC hdc_ref)
 static LRESULT
 TREEVIEW_PrintClient(TREEVIEW_INFO *infoPtr, HDC hdc, DWORD options)
 {
-    FIXME("Partial Stub: (hdc=%p options=0x%08x)\n", hdc, options);
+    FIXME("Partial Stub: (hdc=%p options=%#lx)\n", hdc, options);
 
     if ((options & PRF_CHECKVISIBLE) && !IsWindowVisible(infoPtr->hwnd))
         return 0;
@@ -3789,7 +3789,7 @@ TREEVIEW_HitTest(const TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht)
     }
 
     lpht->hItem = item;
-    TRACE("(%d,%d):result 0x%x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
+    TRACE("(%ld, %ld) : result 0x%x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
 
     return item;
 }
@@ -3866,7 +3866,7 @@ TREEVIEW_Edit_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 static LRESULT
 TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("code=0x%x, id=0x%x, handle=0x%lx\n", HIWORD(wParam), LOWORD(wParam), lParam);
+    TRACE("code 0x%x, id=0x%x, handle %Ix\n", HIWORD(wParam), LOWORD(wParam), lParam);
 
     switch (HIWORD(wParam))
     {
@@ -4472,7 +4472,7 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam)
     else
         GetTextExtentPoint32A(hdc, "", 0, &size);
 
-    TRACE("%d %d %s\n", size.cx, size.cy, debugstr_w(dragItem->pszText));
+    TRACE("%ld, %ld, %s\n", size.cx, size.cy, debugstr_w(dragItem->pszText));
     hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy);
     hOldbmp = SelectObject(hdc, hbmp);
 
@@ -4804,7 +4804,7 @@ TREEVIEW_EnsureVisible(TREEVIEW_INFO *infoPtr, HTREEITEM item, BOOL bHScroll)
 
     viscount = TREEVIEW_GetVisibleCount(infoPtr);
 
-    TRACE("%p (%s) %d - %d viscount(%d)\n", item, TREEVIEW_ItemName(item), item->visibleOrder,
+    TRACE("%p (%s) %ld - %ld viscount(%d)\n", item, TREEVIEW_ItemName(item), item->visibleOrder,
         hasFirstVisible ? infoPtr->firstVisible->visibleOrder : -1, viscount);
 
     if (hasFirstVisible)
@@ -4939,7 +4939,7 @@ TREEVIEW_VScroll(TREEVIEW_INFO *infoPtr, WPARAM wParam)
 
     int nScrollCode = LOWORD(wParam);
 
-    TRACE("wp %lx\n", wParam);
+    TRACE("wp %Ix\n", wParam);
 
     if (!(infoPtr->uInternalStatus & TV_VSCROLL))
 	return 0;
@@ -5009,7 +5009,7 @@ TREEVIEW_HScroll(TREEVIEW_INFO *infoPtr, WPARAM wParam)
     int scrollX = infoPtr->scrollX;
     int nScrollCode = LOWORD(wParam);
 
-    TRACE("wp %lx\n", wParam);
+    TRACE("wp %Ix\n", wParam);
 
     if (!(infoPtr->uInternalStatus & TV_HSCROLL))
 	return FALSE;
@@ -5131,7 +5131,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
     TREEVIEW_INFO *infoPtr;
     LOGFONTW lf;
 
-    TRACE("wnd %p, style 0x%x\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
+    TRACE("wnd %p, style %#lx\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
 
     infoPtr = heap_alloc_zero(sizeof(TREEVIEW_INFO));
 
@@ -5323,7 +5323,7 @@ TREEVIEW_KeyDown(TREEVIEW_INFO *infoPtr, WPARAM wParam)
     TREEVIEW_ITEM *prevItem = infoPtr->selectedItem;
     NMTVKEYDOWN nmkeydown;
 
-    TRACE("%lx\n", wParam);
+    TRACE("%Ix\n", wParam);
 
     nmkeydown.wVKey = wParam;
     nmkeydown.flags = 0;
@@ -5538,13 +5538,13 @@ TREEVIEW_Notify(const TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 
 	if (lppgc->dwFlag == PGF_CALCWIDTH) {
 	    lppgc->iWidth = infoPtr->treeWidth;
-            TRACE("got PGN_CALCSIZE, returning horz size = %d, client=%d\n",
+            TRACE("got PGN_CALCSIZE, returning horz size = %ld, client= %ld\n",
 		  infoPtr->treeWidth, infoPtr->clientWidth);
 	}
 	else {
 	    lppgc->iHeight = infoPtr->treeHeight;
-            TRACE("got PGN_CALCSIZE, returning vert size = %d, client=%d\n",
-		  infoPtr->treeHeight, infoPtr->clientHeight);
+            TRACE("got PGN_CALCSIZE, returning vert size = %ld, client = %ld\n", infoPtr->treeHeight,
+                   infoPtr->clientHeight);
 	}
 	return 0;
     }
@@ -5565,7 +5565,7 @@ TREEVIEW_Size(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
     }
     else
     {
-	FIXME("WM_SIZE flag %lx %lx not handled\n", wParam, lParam);
+        FIXME("WM_SIZE flag %Ix %Ix not handled\n", wParam, lParam);
     }
 
     TREEVIEW_Invalidate(infoPtr, NULL);
@@ -5575,7 +5575,7 @@ TREEVIEW_Size(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 static LRESULT
 TREEVIEW_StyleChanged(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
-    TRACE("(%lx %lx)\n", wParam, lParam);
+    TRACE("%Ix, %Ix.\n", wParam, lParam);
 
     if (wParam == GWL_STYLE)
     {
@@ -5699,7 +5699,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(hwnd);
 
-    TRACE("hwnd %p msg %04x wp=%08lx lp=%08lx\n", hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, msg %04x, wp %Ix, lp %Ix\n", hwnd, uMsg, wParam, lParam);
 
     if (infoPtr) TREEVIEW_VerifyTree(infoPtr);
     else
@@ -5954,7 +5954,7 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
     default:
 	/* This mostly catches MFC and Delphi messages. :( */
 	if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
-	    TRACE("Unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
+	    TRACE("Unknown msg %04x wp %Ix lp %Ix\n", uMsg, wParam, lParam);
 def:
 	return DefWindowProcW(hwnd, uMsg, wParam, lParam);
     }
diff --git a/dlls/comctl32/updown.c b/dlls/comctl32/updown.c
index d5625839db3..e07f9e7a9f2 100644
--- a/dlls/comctl32/updown.c
+++ b/dlls/comctl32/updown.c
@@ -576,8 +576,7 @@ UPDOWN_Buddy_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
 {
     UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr((HWND)ref_data);
 
-    TRACE("hwnd=%p, uMsg=%04x, wParam=%08lx, lParam=%08lx\n",
-          hwnd, uMsg, wParam, lParam);
+    TRACE("hwnd %p, uMsg %04x, wParam %Ix, lParam %Ix\n", hwnd, uMsg, wParam, lParam);
 
     switch(uMsg)
     {
@@ -892,7 +891,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
     UPDOWN_INFO *infoPtr = UPDOWN_GetInfoPtr (hwnd);
     HTHEME theme;
 
-    TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n", hwnd, message, wParam, lParam);
+    TRACE("hwnd %p, msg %04x, wparam %Id, lparam %Ix\n", hwnd, message, wParam, lParam);
 
     if (!infoPtr && (message != WM_CREATE))
         return DefWindowProcW (hwnd, message, wParam, lParam);
@@ -1088,7 +1087,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
 	    return infoPtr->Base;
 
 	case UDM_SETBASE:
-	    TRACE("UpDown Ctrl new base(%ld), hwnd=%p\n", wParam, hwnd);
+	    TRACE("UpDown Ctrl new base(%Id), hwnd=%p\n", wParam, hwnd);
 	    if (wParam==10 || wParam==16) {
 		WPARAM old_base = infoPtr->Base;
 		infoPtr->Base = wParam;
@@ -1159,7 +1158,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
 	}
 	default:
 	    if ((message >= WM_USER) && (message < WM_APP) && !COMCTL32_IsReflectedMessage(message))
-		ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam);
+		ERR("unknown msg %04x wp=%Ix lp=%Ix\n", message, wParam, lParam);
 	    return DefWindowProcW (hwnd, message, wParam, lParam);
     }
 
-- 
2.34.1




More information about the wine-devel mailing list