From aff7ddaeeb63f3ac0ca2ca7c12cc5af388babf6f Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Fri, 22 Nov 2002 21:22:14 +0000
Subject: [PATCH] Made user compile with -DSTRICT.

---
 controls/combo.c       |  21 +++--
 controls/edit.c        |  13 ++--
 controls/listbox.c     |  46 ++++++-----
 controls/menu.c        | 169 ++++++++++++++++++-----------------------
 controls/scroll.c      |  11 ++-
 controls/uitools.c     |   7 +-
 dlls/user/Makefile.in  |   2 +-
 dlls/user/caret.c      |   2 +-
 dlls/user/comm16.c     |   4 +-
 dlls/user/dde/client.c |  16 ++--
 dlls/user/dde/misc.c   |  36 ++++-----
 dlls/user/dde/server.c |   8 +-
 dlls/user/focus.c      |   6 +-
 dlls/user/hook.c       |  10 +--
 dlls/user/message.c    |  10 +--
 dlls/user/misc.c       |   4 +-
 dlls/user/msg16.c      |   6 +-
 dlls/user/painting.c   |   8 +-
 dlls/user/resource.c   |  14 ++--
 dlls/user/text.c       |   4 +-
 windows/class.c        |  96 ++++++++++++-----------
 windows/clipboard.c    |  14 ++--
 windows/cursoricon.c   |  17 ++---
 windows/dce.c          |  29 ++++---
 windows/defdlg.c       |   2 +-
 windows/defwnd.c       |   8 +-
 windows/dialog.c       |  14 ++--
 windows/input.c        |  10 +--
 windows/mdi.c          |  51 ++++++-------
 windows/message.c      |  10 +--
 windows/nonclient.c    |  16 ++--
 windows/painting.c     |  20 ++---
 windows/spy.c          |  20 ++---
 windows/timer.c        |  15 ++--
 windows/user.c         |  30 ++++----
 windows/win.c          |  44 +++++------
 windows/winpos.c       |  35 +++++----
 windows/winproc.c      |  12 +--
 38 files changed, 397 insertions(+), 443 deletions(-)

diff --git a/controls/combo.c b/controls/combo.c
index 83e706520f0..830922e3671 100644
--- a/controls/combo.c
+++ b/controls/combo.c
@@ -169,7 +169,7 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
 
    if( lphc )
    {
-       TRACE("[%04x]: freeing storage\n", lphc->self);
+       TRACE("[%p]: freeing storage\n", lphc->self);
 
        if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox )
    	   DestroyWindow( lphc->hWndLBox );
@@ -1000,7 +1000,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
   hDC = (hParamDC) ? hParamDC
 		   : BeginPaint( lphc->self, &ps);
 
-  TRACE("hdc=%04x\n", hDC);
+  TRACE("hdc=%p\n", hDC);
 
   if( hDC && !(lphc->wState & CBF_NOREDRAW) )
   {
@@ -1150,7 +1150,7 @@ static void CBDropDown( LPHEADCOMBO lphc )
    int nItems = 0;
    int nDroppedHeight;
 
-   TRACE("[%04x]: drop down\n", lphc->self);
+   TRACE("[%p]: drop down\n", lphc->self);
 
    CB_NOTIFY( lphc, CBN_DROPDOWN );
 
@@ -1244,7 +1244,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL ok, BOOL bButton )
 {
    HWND	hWnd = lphc->self;
 
-   TRACE("[%04x]: sel ok? [%i] dropped? [%i]\n",
+   TRACE("[%p]: sel ok? [%i] dropped? [%i]\n",
 	 lphc->self, (INT)ok, (INT)(lphc->wState & CBF_DROPPED));
 
    CB_NOTIFY( lphc, (ok) ? CBN_SELENDOK : CBN_SELENDCANCEL );
@@ -1377,16 +1377,14 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
        {
 	   case (EN_SETFOCUS >> 8):
 
-		TRACE("[%04x]: edit [%04x] got focus\n",
-			     lphc->self, lphc->hWndEdit );
+               TRACE("[%p]: edit [%p] got focus\n", lphc->self, lphc->hWndEdit );
 
 		COMBO_SetFocus( lphc );
 	        break;
 
 	   case (EN_KILLFOCUS >> 8):
 
-		TRACE("[%04x]: edit [%04x] lost focus\n",
-			     lphc->self, lphc->hWndEdit );
+               TRACE("[%p]: edit [%p] lost focus\n", lphc->self, lphc->hWndEdit );
 
 		/* NOTE: it seems that Windows' edit control sends an
 		 * undocumented message WM_USER + 0x1B instead of this
@@ -1443,8 +1441,7 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
 	   case LBN_SELCHANGE:
 	   case LBN_SELCANCEL:
 
-		TRACE("[%04x]: lbox selection change [%04x]\n",
-			     lphc->self, lphc->wState );
+               TRACE("[%p]: lbox selection change [%x]\n", lphc->self, lphc->wState );
 
 		if( HIWORD(wParam) == LBN_SELCHANGE)
 		{
@@ -1492,7 +1489,7 @@ static LRESULT COMBO_ItemOp( LPHEADCOMBO lphc, UINT msg, LPARAM lParam )
    HWND hWnd = lphc->self;
    UINT id = GetWindowLongA( hWnd, GWL_ID );
 
-   TRACE("[%04x]: ownerdraw op %04x\n", lphc->self, msg );
+   TRACE("[%p]: ownerdraw op %04x\n", lphc->self, msg );
 
    switch( msg )
    {
@@ -1911,7 +1908,7 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
 {
       LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwnd, 0 );
 
-      TRACE("[%04x]: msg %s wp %08x lp %08lx\n",
+      TRACE("[%p]: msg %s wp %08x lp %08lx\n",
             hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
 
       if( lphc || message == WM_NCCREATE )
diff --git a/controls/edit.c b/controls/edit.c
index 9a19092b5d1..9149d0d1651 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -154,7 +154,7 @@ typedef struct
 #define EDIT_NOTIFY_PARENT(es, wNotifyCode, str) \
 	do \
 	{ /* Notify parent which has created this edit control */ \
-	    TRACE("notification " str " sent to hwnd=%08x\n", es->hwndParent); \
+	    TRACE("notification " str " sent to hwnd=%p\n", es->hwndParent); \
 	    SendMessageW(es->hwndParent, WM_COMMAND, \
 		     MAKEWPARAM(GetWindowLongW((es->hwndSelf),GWL_ID), wNotifyCode), \
 		     (LPARAM)(es->hwndSelf)); \
@@ -419,7 +419,7 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
 	EDITSTATE *es = (EDITSTATE *)GetWindowLongW( hwnd, 0 );
 	LRESULT result = 0;
 
-        TRACE("hwnd=%x msg=%x wparam=%x lparam=%lx\n", hwnd, msg, wParam, lParam);
+        TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, msg, wParam, lParam);
 	
 	if (!es && msg != WM_NCCREATE)
 		return DefWindowProcT(hwnd, msg, wParam, lParam, unicode);
@@ -1710,7 +1710,7 @@ static BOOL EDIT_MakeFit(EDITSTATE *es, UINT size, BOOL honor_limit)
 	if (es->hloc32W) {
 	    UINT alloc_size = ROUND_TO_GROW((size + 1) * sizeof(WCHAR));
 	    if ((hNew32W = LocalReAlloc(es->hloc32W, alloc_size, LMEM_MOVEABLE | LMEM_ZEROINIT))) {
-		TRACE("Old 32 bit handle %08x, new handle %08x\n", es->hloc32W, hNew32W);
+		TRACE("Old 32 bit handle %p, new handle %p\n", es->hloc32W, hNew32W);
 		es->hloc32W = hNew32W;
 		es->buffer_size = LocalSize(hNew32W)/sizeof(WCHAR) - 1;
 	    }
@@ -2185,7 +2185,7 @@ static void EDIT_UnlockBuffer(EDITSTATE *es, BOOL force)
 	/* Edit window might be already destroyed */
 	if(!IsWindow(es->hwndSelf))
 	{
-	    WARN("edit hwnd %04x already destroyed\n", es->hwndSelf);
+	    WARN("edit hwnd %p already destroyed\n", es->hwndSelf);
 	    return;
     	}
 
@@ -2468,7 +2468,7 @@ static HLOCAL EDIT_EM_GetHandle(EDITSTATE *es)
 	    hLocal = es->hloc32A;
 	}
 
-	TRACE("Returning %04X, LocalSize() = %ld\n", hLocal, LocalSize(hLocal));
+	TRACE("Returning %p, LocalSize() = %ld\n", hLocal, LocalSize(hLocal));
 	return hLocal;
 }
 
@@ -3981,8 +3981,7 @@ static BOOL EDIT_CheckCombo(EDITSTATE *es, UINT msg, INT key)
    bDropped = TRUE;
    nEUI     = 0;
 
-   TRACE_(combo)("[%04x]: handling msg %04x (%04x)\n",
-       		     es->hwndSelf, (UINT16)msg, (UINT16)key);
+   TRACE_(combo)("[%p]: handling msg %x (%x)\n", es->hwndSelf, msg, key);
 
    if (key == VK_UP || key == VK_DOWN)
    {
diff --git a/controls/listbox.c b/controls/listbox.c
index 961b1742b2c..24c02dc4300 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -178,9 +178,8 @@ void LISTBOX_Dump( HWND hwnd )
     LB_DESCR *descr = (LB_DESCR *)GetWindowLongA( hwnd, 0 );
 
     TRACE( "Listbox:\n" );
-    TRACE( "hwnd=%04x descr=%08x items=%d top=%d\n",
-                     hwnd, (UINT)descr, descr->nb_items,
-                     descr->top_item );
+    TRACE( "hwnd=%p descr=%08x items=%d top=%d\n",
+           hwnd, (UINT)descr, descr->nb_items, descr->top_item );
     for (i = 0, item = descr->items; i < descr->nb_items; i++, item++)
     {
         TRACE( "%4d: %-40s %d %08lx %3d\n",
@@ -421,7 +420,7 @@ static void LISTBOX_UpdateSize( HWND hwnd, LB_DESCR *descr )
                 if ((descr->item_height - remaining) <= ncheight)
                     remaining = remaining - descr->item_height;
             }
-            TRACE("[%04x]: changing height %d -> %d\n",
+            TRACE("[%p]: changing height %d -> %d\n",
                   hwnd, descr->height, descr->height - remaining );
             SetWindowPos( hwnd, 0, 0, 0, rect.right - rect.left,
                             rect.bottom - rect.top - remaining,
@@ -429,7 +428,7 @@ static void LISTBOX_UpdateSize( HWND hwnd, LB_DESCR *descr )
             return;
         }
     }
-    TRACE("[%04x]: new size = %d,%d\n", hwnd, descr->width, descr->height );
+    TRACE("[%p]: new size = %d,%d\n", hwnd, descr->width, descr->height );
     LISTBOX_UpdatePage( hwnd, descr );
     LISTBOX_UpdateScroll( hwnd, descr );
 
@@ -590,7 +589,7 @@ static void LISTBOX_PaintItem( HWND hwnd, LB_DESCR *descr, HDC hdc,
         if (!IsWindowEnabled(hwnd)) dis.itemState |= ODS_DISABLED;
         dis.itemData     = item ? item->data : 0;
         dis.rcItem       = *rect;
-        TRACE("[%04x]: drawitem %d (%s) action=%02x state=%02x rect=%d,%d-%d,%d\n",
+        TRACE("[%p]: drawitem %d (%s) action=%02x state=%02x rect=%d,%d-%d,%d\n",
               hwnd, index, item ? debugstr_w(item->str) : "", action,
               dis.itemState, rect->left, rect->top, rect->right, rect->bottom );
         SendMessageW(descr->owner, WM_DRAWITEM, id, (LPARAM)&dis);
@@ -610,7 +609,7 @@ static void LISTBOX_PaintItem( HWND hwnd, LB_DESCR *descr, HDC hdc,
             oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
         }
 
-        TRACE("[%04x]: painting %d (%s) action=%02x rect=%d,%d-%d,%d\n",
+        TRACE("[%p]: painting %d (%s) action=%02x rect=%d,%d-%d,%d\n",
               hwnd, index, item ? debugstr_w(item->str) : "", action,
               rect->left, rect->top, rect->right, rect->bottom );
         if (!item)
@@ -748,7 +747,7 @@ static BOOL LISTBOX_SetTabStops( HWND hwnd, LB_DESCR *descr, INT count,
         INT i;
         LPINT16 p = (LPINT16)tabs;
 
-        TRACE("[%04x]: settabstops ", hwnd );
+        TRACE("[%p]: settabstops ", hwnd );
         for (i = 0; i < descr->nb_tabs; i++) {
 	    descr->tabs[i] = *p++<<1; /* FIXME */
             if (TRACE_ON(listbox)) DPRINTF("%hd ", descr->tabs[i]);
@@ -1159,7 +1158,7 @@ static LRESULT LISTBOX_SetItemHeight( HWND hwnd, LB_DESCR *descr, INT index,
     if (descr->style & LBS_OWNERDRAWVARIABLE)
     {
         if ((index < 0) || (index >= descr->nb_items)) return LB_ERR;
-        TRACE("[%04x]: item %d height = %d\n", hwnd, index, height );
+        TRACE("[%p]: item %d height = %d\n", hwnd, index, height );
         descr->items[index].height = height;
         LISTBOX_UpdateScroll( hwnd, descr );
 	if (repaint)
@@ -1167,7 +1166,7 @@ static LRESULT LISTBOX_SetItemHeight( HWND hwnd, LB_DESCR *descr, INT index,
     }
     else if (height != descr->item_height)
     {
-        TRACE("[%04x]: new height = %d\n", hwnd, height );
+        TRACE("[%p]: new height = %d\n", hwnd, height );
         descr->item_height = height;
         LISTBOX_UpdatePage( hwnd, descr );
         LISTBOX_UpdateScroll( hwnd, descr );
@@ -1189,7 +1188,7 @@ static void LISTBOX_SetHorizontalPos( HWND hwnd, LB_DESCR *descr, INT pos )
         pos = descr->horz_extent - descr->width;
     if (pos < 0) pos = 0;
     if (!(diff = descr->horz_pos - pos)) return;
-    TRACE("[%04x]: new horz pos = %d\n", hwnd, pos );
+    TRACE("[%p]: new horz pos = %d\n", hwnd, pos );
     descr->horz_pos = pos;
     LISTBOX_UpdateScroll( hwnd, descr );
     if (abs(diff) < descr->width)
@@ -1210,7 +1209,7 @@ static LRESULT LISTBOX_SetHorizontalExtent( HWND hwnd, LB_DESCR *descr,
         return LB_OKAY;
     if (extent <= 0) extent = 1;
     if (extent == descr->horz_extent) return LB_OKAY;
-    TRACE("[%04x]: new horz extent = %d\n", hwnd, extent );
+    TRACE("[%p]: new horz extent = %d\n", hwnd, extent );
     descr->horz_extent = extent;
     if (descr->horz_pos > extent - descr->width)
         LISTBOX_SetHorizontalPos( hwnd, descr, extent - descr->width );
@@ -1226,7 +1225,7 @@ static LRESULT LISTBOX_SetHorizontalExtent( HWND hwnd, LB_DESCR *descr,
 static LRESULT LISTBOX_SetColumnWidth( HWND hwnd, LB_DESCR *descr, INT width)
 {
     if (width == descr->column_width) return LB_OKAY;
-    TRACE("[%04x]: new column width = %d\n", hwnd, width );
+    TRACE("[%p]: new column width = %d\n", hwnd, width );
     descr->column_width = width;
     LISTBOX_UpdatePage( hwnd, descr );
     return LB_OKAY;
@@ -1509,7 +1508,7 @@ static LRESULT LISTBOX_InsertItem( HWND hwnd, LB_DESCR *descr, INT index,
         mis.itemHeight = descr->item_height;
         SendMessageW( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis );
         item->height = mis.itemHeight ? mis.itemHeight : 1;
-        TRACE("[%04x]: measure item %d (%s) = %d\n",
+        TRACE("[%p]: measure item %d (%s) = %d\n",
               hwnd, index, str ? debugstr_w(str) : "", item->height );
     }
 
@@ -1570,7 +1569,7 @@ static LRESULT LISTBOX_InsertString( HWND hwnd, LB_DESCR *descr, INT index,
         return ret;
     }
 
-    TRACE("[%04x]: added item %d %s\n",
+    TRACE("[%p]: added item %d %s\n",
           hwnd, index, HAS_STRINGS(descr) ? debugstr_w(new_str) : "" );
     return index;
 }
@@ -1946,7 +1945,7 @@ static LRESULT LISTBOX_HandleLButtonDown( HWND hwnd, LB_DESCR *descr,
                                           WPARAM wParam, INT x, INT y )
 {
     INT index = LISTBOX_GetItemFromPoint( descr, x, y );
-    TRACE("[%04x]: lbuttondown %d,%d item %d\n", hwnd, x, y, index );
+    TRACE("[%p]: lbuttondown %d,%d item %d\n", hwnd, x, y, index );
     if (!descr->caret_on && (descr->in_focus)) return 0;
 
     if (!descr->in_focus)
@@ -2420,8 +2419,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
 
     if( lphc )
     {
-	TRACE_(combo)("[%04x]: resetting owner %04x -> %04x\n",
-                      hwnd, descr->owner, lphc->self );
+        TRACE_(combo)("[%p]: resetting owner %p -> %p\n", hwnd, descr->owner, lphc->self );
         descr->owner = lphc->self;
     }
 
@@ -2455,7 +2453,7 @@ static BOOL LISTBOX_Create( HWND hwnd, LPHEADCOMBO lphc )
 	}
     }
 
-    TRACE("owner: %04x, style: %08x, width: %d, height: %d\n", descr->owner, descr->style, descr->width, descr->height);
+    TRACE("owner: %p, style: %08x, width: %d, height: %d\n", descr->owner, descr->style, descr->width, descr->height);
     return TRUE;
 }
 
@@ -2487,7 +2485,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
         {
             if (!LISTBOX_Create( hwnd, NULL ))
                 return -1;
-            TRACE("creating wnd=%04x descr=%lx\n", hwnd, GetWindowLongA( hwnd, 0 ) );
+            TRACE("creating wnd=%p descr=%lx\n", hwnd, GetWindowLongA( hwnd, 0 ) );
             return 0;
         }
         /* Ignore all other messages before we get a WM_CREATE */
@@ -2495,7 +2493,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
                          DefWindowProcA( hwnd, msg, wParam, lParam );
     }
 
-    TRACE("[%04x]: msg %s wp %08x lp %08lx\n",
+    TRACE("[%p]: msg %s wp %08x lp %08lx\n",
           hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
     switch(msg)
     {
@@ -2989,7 +2987,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
             RECT rect;
             HBRUSH hbrush = (HBRUSH)SendMessageW( descr->owner, WM_CTLCOLORLISTBOX,
                                               wParam, (LPARAM)hwnd );
-	    TRACE("hbrush = %04x\n", hbrush);
+	    TRACE("hbrush = %p\n", hbrush);
 	    if(!hbrush)
 		hbrush = GetSysColorBrush(COLOR_WINDOW);
 	    if(hbrush)
@@ -3007,7 +3005,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
 
     default:
         if ((msg >= WM_USER) && (msg < 0xc000))
-            WARN("[%04x]: unknown msg %04x wp %08x lp %08lx\n",
+            WARN("[%p]: unknown msg %04x wp %08x lp %08lx\n",
                  hwnd, msg, wParam, lParam );
         return unicode ? DefWindowProcW( hwnd, msg, wParam, lParam ) :
                          DefWindowProcA( hwnd, msg, wParam, lParam );
@@ -3062,7 +3060,7 @@ static LRESULT WINAPI ComboLBWndProc_common( HWND hwnd, UINT msg,
                          DefWindowProcA( hwnd, msg, wParam, lParam );
     }
 
-    TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n",
+    TRACE_(combo)("[%p]: msg %s wp %08x lp %08lx\n",
                   hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
 
     if ((lphc = descr->lphc) != NULL)
diff --git a/controls/menu.c b/controls/menu.c
index 8b0968ce46e..e7f2583ce17 100644
--- a/controls/menu.c
+++ b/controls/menu.c
@@ -219,7 +219,7 @@ static void do_debug_print_menuitem(const char *prefix, MENUITEM * mp,
 	int type = MENU_ITEM_TYPE(flags);
 	DPRINTF( "{ ID=0x%x", mp->wID);
 	if (flags & MF_POPUP)
-	    DPRINTF( ", Sub=0x%x", mp->hSubMenu);
+	    DPRINTF( ", Sub=%p", mp->hSubMenu);
 	if (flags) {
 	    int count = 0;
 	    DPRINTF( ", Type=");
@@ -261,9 +261,9 @@ static void do_debug_print_menuitem(const char *prefix, MENUITEM * mp,
 		DPRINTF( "+0x%x", flags);
 	}
 	if (mp->hCheckBit)
-	    DPRINTF( ", Chk=0x%x", mp->hCheckBit);
+	    DPRINTF( ", Chk=%p", mp->hCheckBit);
 	if (mp->hUnCheckBit)
-	    DPRINTF( ", Unc=0x%x", mp->hUnCheckBit);
+	    DPRINTF( ", Unc=%p", mp->hUnCheckBit);
 
 	if (type == MFT_STRING) {
 	    if (mp->text)
@@ -298,7 +298,7 @@ static POPUPMENU *MENU_GetMenu(HMENU hMenu)
     POPUPMENU *menu = USER_HEAP_LIN_ADDR(hMenu);
     if (!menu || menu->wMagic != MENU_MAGIC)
     {
-        WARN("invalid menu handle=%x, ptr=%p, magic=%x\n", hMenu, menu, menu? menu->wMagic:0);
+        WARN("invalid menu handle=%p, ptr=%p, magic=%x\n", hMenu, menu, menu? menu->wMagic:0);
         menu = NULL;
     }
     return menu;
@@ -338,7 +338,7 @@ static HMENU MENU_CopySysPopup(void)
     else
 	ERR("Unable to load default system menu\n" );
 
-    TRACE("returning %x.\n", hMenu );
+    TRACE("returning %p.\n", hMenu );
 
     return hMenu;
 }
@@ -357,13 +357,13 @@ HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
 {
     HMENU hMenu;
 
-    TRACE("loading system menu, hWnd %04x, hPopupMenu %04x\n", hWnd, hPopupMenu);
+    TRACE("loading system menu, hWnd %p, hPopupMenu %p\n", hWnd, hPopupMenu);
     if ((hMenu = CreateMenu()))
     {
 	POPUPMENU *menu = MENU_GetMenu(hMenu);
 	menu->wFlags = MF_SYSMENU;
 	menu->hWnd = WIN_GetFullHandle( hWnd );
-	TRACE("hWnd %04x (hMenu %04x)\n", menu->hWnd, hMenu);
+	TRACE("hWnd %p (hMenu %p)\n", menu->hWnd, hMenu);
 
 	if (hPopupMenu == (HMENU)(-1))
 	    hPopupMenu = MENU_CopySysPopup();
@@ -378,7 +378,7 @@ HMENU MENU_GetSysMenu( HWND hWnd, HMENU hPopupMenu )
             menu->items[0].fState = 0;
             if ((menu = MENU_GetMenu(hPopupMenu))) menu->wFlags |= MF_SYSMENU;
 
-	    TRACE("hMenu=%04x (hPopup %04x)\n", hMenu, hPopupMenu );
+	    TRACE("hMenu=%p (hPopup %p)\n", hMenu, hPopupMenu );
 	    return hMenu;
 	}
 	DestroyMenu( hMenu );
@@ -664,7 +664,7 @@ static MENUITEM *MENU_FindItemByCoords( POPUPMENU *menu,
 static UINT MENU_FindItemByKey( HWND hwndOwner, HMENU hmenu,
 				  UINT key, BOOL forceMenuChar )
 {
-    TRACE("\tlooking for '%c' in [%x]\n", (char)key, hmenu );
+    TRACE("\tlooking for '%c' in [%p]\n", (char)key, hmenu );
 
     if (!IsMenu( hmenu )) hmenu = GetSubMenu( get_win_sys_menu(hwndOwner), 0);
 
@@ -855,7 +855,7 @@ static void MENU_CalcItemSize( HDC hdc, MENUITEM *lpitem, HWND hwndOwner,
     WCHAR *p;
     UINT check_bitmap_width = GetSystemMetrics( SM_CXMENUCHECK );
 
-    TRACE("dc=0x%04x owner=0x%04x (%d,%d)\n", hdc, hwndOwner, orgX, orgY);
+    TRACE("dc=%p owner=%p (%d,%d)\n", hdc, hwndOwner, orgX, orgY);
     debug_print_menuitem("MENU_CalcItemSize: menuitem:", lpitem,
 			 (menuBar ? " (MenuBar)" : ""));
 
@@ -1168,8 +1168,8 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
         dis.hwndItem   = (HWND)hmenu;
         dis.hDC        = hdc;
         dis.rcItem     = lpitem->rect;
-        TRACE("Ownerdraw: owner=%04x itemID=%d, itemState=%d, itemAction=%d, "
-	      "hwndItem=%04x, hdc=%04x, rcItem={%d,%d,%d,%d}\n", hwndOwner,
+        TRACE("Ownerdraw: owner=%p itemID=%d, itemState=%d, itemAction=%d, "
+	      "hwndItem=%p, hdc=%p, rcItem={%d,%d,%d,%d}\n", hwndOwner,
 	      dis.itemID, dis.itemState, dis.itemAction, dis.hwndItem,
 	      dis.hDC, dis.rcItem.left, dis.rcItem.top, dis.rcItem.right,
 	      dis.rcItem.bottom);
@@ -1440,7 +1440,7 @@ static void MENU_DrawPopupMenu( HWND hwnd, HDC hdc, HMENU hmenu )
     HBRUSH hPrevBrush = 0;
     RECT rect;
 
-    TRACE("wnd=0x%04x dc=0x%04x menu=0x%04x\n", hwnd, hdc, hmenu);
+    TRACE("wnd=%p dc=%p menu=%p\n", hwnd, hdc, hmenu);
 
     GetClientRect( hwnd, &rect );
 
@@ -1526,7 +1526,7 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
         goto END;
     }
 
-    TRACE("(%04x, %p, %p)\n", hDC, lprect, lppop);
+    TRACE("(%p, %p, %p)\n", hDC, lprect, lppop);
 
     hfontOld = SelectObject( hDC, hMenuFont);
 
@@ -1586,8 +1586,8 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
     POPUPMENU *menu;
     UINT width, height;
 
-    TRACE("owner=0x%04x hmenu=0x%04x id=0x%04x x=0x%04x y=0x%04x xa=0x%04x ya=0x%04x\n",
-    hwndOwner, hmenu, id, x, y, xanchor, yanchor);
+    TRACE("owner=%p hmenu=%p id=0x%04x x=0x%04x y=0x%04x xa=0x%04x ya=0x%04x\n",
+          hwndOwner, hmenu, id, x, y, xanchor, yanchor);
 
     if (!(menu = MENU_GetMenu( hmenu ))) return FALSE;
     if (menu->FocusedItem != NO_SELECTED_ITEM)
@@ -1657,7 +1657,7 @@ static void MENU_SelectItem( HWND hwndOwner, HMENU hmenu, UINT wIndex,
     LPPOPUPMENU lppop;
     HDC hdc;
 
-    TRACE("owner=0x%04x menu=0x%04x index=0x%04x select=0x%04x\n", hwndOwner, hmenu, wIndex, sendMenuSelect);
+    TRACE("owner=%p menu=%p index=0x%04x select=0x%04x\n", hwndOwner, hmenu, wIndex, sendMenuSelect);
 
     lppop = MENU_GetMenu( hmenu );
     if ((!lppop) || (!lppop->nItems) || (!lppop->hWnd)) return;
@@ -1725,7 +1725,7 @@ static void MENU_MoveSelection( HWND hwndOwner, HMENU hmenu, INT offset )
     INT i;
     POPUPMENU *menu;
 
-    TRACE("hwnd=0x%04x hmenu=0x%04x off=0x%04x\n", hwndOwner, hmenu, offset);
+    TRACE("hwnd=%p hmenu=%p off=0x%04x\n", hwndOwner, hmenu, offset);
 
     menu = MENU_GetMenu( hmenu );
     if ((!menu) || (!menu->items)) return;
@@ -2019,7 +2019,7 @@ static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
 {
     POPUPMENU *menu = MENU_GetMenu( hmenu );
 
-    TRACE("owner=0x%04x hmenu=0x%04x 0x%04x\n", hwndOwner, hmenu, sendMenuSelect);
+    TRACE("owner=%p hmenu=%p 0x%04x\n", hwndOwner, hmenu, sendMenuSelect);
 
     if (menu && top_popup)
     {
@@ -2059,7 +2059,7 @@ static HMENU MENU_ShowSubPopup( HWND hwndOwner, HMENU hmenu,
     MENUITEM *item;
     HDC hdc;
 
-    TRACE("owner=0x%04x hmenu=0x%04x 0x%04x\n", hwndOwner, hmenu, selectFirst);
+    TRACE("owner=%p hmenu=%p 0x%04x\n", hwndOwner, hmenu, selectFirst);
 
     if (!(menu = MENU_GetMenu( hmenu ))) return hmenu;
 
@@ -2191,15 +2191,14 @@ static INT MENU_ExecFocusedItem( MTRACKER* pmt, HMENU hMenu, UINT wFlags )
     MENUITEM *item;
     POPUPMENU *menu = MENU_GetMenu( hMenu );
 
-    TRACE("%p hmenu=0x%04x\n", pmt, hMenu);
+    TRACE("%p hmenu=%p\n", pmt, hMenu);
 
     if (!menu || !menu->nItems ||
 	(menu->FocusedItem == NO_SELECTED_ITEM)) return -1;
 
     item = &menu->items[menu->FocusedItem];
 
-    TRACE("%08x %08x %08x\n",
-                 hMenu, item->wID, item->hSubMenu);
+    TRACE("%p %08x %p\n", hMenu, item->wID, item->hSubMenu);
 
     if (!(item->fType & MF_POPUP))
     {
@@ -2234,7 +2233,7 @@ static void MENU_SwitchTracking( MTRACKER* pmt, HMENU hPtMenu, UINT id )
     POPUPMENU *ptmenu = MENU_GetMenu( hPtMenu );
     POPUPMENU *topmenu = MENU_GetMenu( pmt->hTopMenu );
 
-    TRACE("%p hmenu=0x%04x 0x%04x\n", pmt, hPtMenu, id);
+    TRACE("%p hmenu=%p 0x%04x\n", pmt, hPtMenu, id);
 
     if( pmt->hTopMenu != hPtMenu &&
 	!((ptmenu->wFlags | topmenu->wFlags) & MF_POPUP) )
@@ -2256,7 +2255,7 @@ static void MENU_SwitchTracking( MTRACKER* pmt, HMENU hPtMenu, UINT id )
  */
 static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
 {
-    TRACE("%p hPtMenu=0x%04x\n", pmt, hPtMenu);
+    TRACE("%p hPtMenu=%p\n", pmt, hPtMenu);
 
     if (hPtMenu)
     {
@@ -2301,7 +2300,7 @@ static BOOL MENU_ButtonDown( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags )
  */
 static INT MENU_ButtonUp( MTRACKER* pmt, HMENU hPtMenu, UINT wFlags)
 {
-    TRACE("%p hmenu=0x%04x\n", pmt, hPtMenu);
+    TRACE("%p hmenu=%p\n", pmt, hPtMenu);
 
     if (hPtMenu)
     {
@@ -2411,7 +2410,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk )
         next_menu.hwndNext = 0;
         SendMessageW( pmt->hOwnerWnd, WM_NEXTMENU, vk, (LPARAM)&next_menu );
 
-	TRACE("%04x [%04x] -> %04x [%04x]\n",
+        TRACE("%p [%p] -> %p [%p]\n",
               pmt->hCurrentMenu, pmt->hOwnerWnd, next_menu.hmenuNext, next_menu.hwndNext );
 
 	if (!next_menu.hmenuNext || !next_menu.hwndNext)
@@ -2623,11 +2622,10 @@ static void MENU_KeyRight( MTRACKER* pmt, UINT wFlags )
     POPUPMENU *menu = MENU_GetMenu( pmt->hTopMenu );
     UINT  nextcol;
 
-    TRACE("MENU_KeyRight called, cur %x (%s), top %x (%s).\n",
-		  pmt->hCurrentMenu,
-		  debugstr_w((MENU_GetMenu(pmt->hCurrentMenu))->
-		     items[0].text),
-		  pmt->hTopMenu, debugstr_w(menu->items[0].text) );
+    TRACE("MENU_KeyRight called, cur %p (%s), top %p (%s).\n",
+          pmt->hCurrentMenu,
+          debugstr_w((MENU_GetMenu(pmt->hCurrentMenu))->items[0].text),
+          pmt->hTopMenu, debugstr_w(menu->items[0].text) );
 
     if ( (menu->wFlags & MF_POPUP) || (pmt->hCurrentMenu != pmt->hTopMenu))
     {
@@ -2690,9 +2688,9 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
     mt.pt.x = x;
     mt.pt.y = y;
 
-    TRACE("hmenu=0x%04x flags=0x%08x (%d,%d) hwnd=0x%04x (%d,%d)-(%d,%d)\n",
-	    hmenu, wFlags, x, y, hwnd, (lprect) ? lprect->left : 0, (lprect) ? lprect->top : 0,
-	    (lprect) ? lprect->right : 0,  (lprect) ? lprect->bottom : 0);
+    TRACE("hmenu=%p flags=0x%08x (%d,%d) hwnd=%p (%d,%d)-(%d,%d)\n",
+          hmenu, wFlags, x, y, hwnd, (lprect) ? lprect->left : 0, (lprect) ? lprect->top : 0,
+          (lprect) ? lprect->right : 0,  (lprect) ? lprect->bottom : 0);
 
     fEndMenu = FALSE;
     if (!(menu = MENU_GetMenu( hmenu ))) return FALSE;
@@ -2968,7 +2966,7 @@ static INT MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
  */
 static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
 {
-    TRACE("hwnd=0x%04x hmenu=0x%04x\n", hWnd, hMenu);
+    TRACE("hwnd=%p hmenu=%p\n", hWnd, hMenu);
 
     HideCaret(0);
 
@@ -2997,7 +2995,7 @@ static BOOL MENU_InitTracking(HWND hWnd, HMENU hMenu, BOOL bPopup, UINT wFlags)
  */
 static BOOL MENU_ExitTracking(HWND hWnd)
 {
-    TRACE("hwnd=0x%04x\n", hWnd);
+    TRACE("hwnd=%p\n", hWnd);
 
     SendMessageA( hWnd, WM_EXITMENULOOP, 0, 0 );
     ShowCaret(0);
@@ -3014,7 +3012,7 @@ void MENU_TrackMouseMenuBar( HWND hWnd, INT ht, POINT pt )
     HMENU hMenu = (ht == HTSYSMENU) ? get_win_sys_menu( hWnd ) : GetMenu( hWnd );
     UINT wFlags = TPM_ENTERIDLEEX | TPM_BUTTONDOWN | TPM_LEFTALIGN | TPM_LEFTBUTTON;
 
-    TRACE("wnd=%x ht=0x%04x (%ld,%ld)\n", hWnd, ht, pt.x, pt.y);
+    TRACE("wnd=%p ht=0x%04x (%ld,%ld)\n", hWnd, ht, pt.x, pt.y);
 
     if (IsMenu(hMenu))
     {
@@ -3131,8 +3129,7 @@ BOOL WINAPI TrackPopupMenuEx( HMENU hMenu, UINT wFlags, INT x, INT y,
  */
 static LRESULT WINAPI PopupMenuWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
 {
-    TRACE("hwnd=0x%04x msg=0x%04x wp=0x%04x lp=0x%08lx\n",
-    hwnd, message, wParam, lParam);
+    TRACE("hwnd=%p msg=0x%04x wp=0x%04x lp=0x%08lx\n", hwnd, message, wParam, lParam);
 
     switch(message)
     {
@@ -3199,8 +3196,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
     RECT rectBar;
     LPPOPUPMENU lppop;
 
-    TRACE("HWND 0x%x, width %d, at (%d, %d).\n",
-          hwnd, menubarWidth, orgX, orgY );
+    TRACE("HWND %p, width %d, at (%d, %d).\n", hwnd, menubarWidth, orgX, orgY );
 
     if (!(lppop = MENU_GetMenu( GetMenu(hwnd) ))) return 0;
 
@@ -3219,8 +3215,7 @@ UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
 BOOL WINAPI ChangeMenuA( HMENU hMenu, UINT pos, LPCSTR data,
                              UINT id, UINT flags )
 {
-    TRACE("menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n",
-                  hMenu, pos, (DWORD)data, id, flags );
+    TRACE("menu=%p pos=%d data=%p id=%08x flags=%08x\n", hMenu, pos, data, id, flags );
     if (flags & MF_APPEND) return AppendMenuA( hMenu, flags & ~MF_APPEND,
                                                  id, data );
     if (flags & MF_DELETE) return DeleteMenu(hMenu, pos, flags & ~MF_DELETE);
@@ -3240,8 +3235,7 @@ BOOL WINAPI ChangeMenuA( HMENU hMenu, UINT pos, LPCSTR data,
 BOOL WINAPI ChangeMenuW( HMENU hMenu, UINT pos, LPCWSTR data,
                              UINT id, UINT flags )
 {
-    TRACE("menu=%08x pos=%d data=%08lx id=%08x flags=%08x\n",
-                  hMenu, pos, (DWORD)data, id, flags );
+    TRACE("menu=%p pos=%d data=%p id=%08x flags=%08x\n", hMenu, pos, data, id, flags );
     if (flags & MF_APPEND) return AppendMenuW( hMenu, flags & ~MF_APPEND,
                                                  id, data );
     if (flags & MF_DELETE) return DeleteMenu(hMenu, pos, flags & ~MF_DELETE);
@@ -3263,7 +3257,7 @@ DWORD WINAPI CheckMenuItem( HMENU hMenu, UINT id, UINT flags )
     MENUITEM *item;
     DWORD ret;
 
-    TRACE("menu=%04x id=%04x flags=%04x\n", hMenu, id, flags );
+    TRACE("menu=%p id=%04x flags=%04x\n", hMenu, id, flags );
     if (!(item = MENU_FindItem( &hMenu, &id, flags ))) return -1;
     ret = item->fState & MF_CHECKED;
     if (flags & MF_CHECKED) item->fState |= MF_CHECKED;
@@ -3281,8 +3275,7 @@ UINT WINAPI EnableMenuItem( HMENU hMenu, UINT wItemID, UINT wFlags )
     MENUITEM *item;
     POPUPMENU *menu;
 
-    TRACE("(%04x, %04X, %04X) !\n",
-		 hMenu, wItemID, wFlags);
+    TRACE("(%p, %04x, %04x) !\n", hMenu, wItemID, wFlags);
 
     /* Get the Popupmenu to access the owner menu */
     if (!(menu = MENU_GetMenu(hMenu)))
@@ -3328,8 +3321,7 @@ INT WINAPI GetMenuStringA(
 ) {
     MENUITEM *item;
 
-    TRACE("menu=%04x item=%04x ptr=%p len=%d flags=%04x\n",
-                 hMenu, wItemID, str, nMaxSiz, wFlags );
+    TRACE("menu=%p item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags );
     if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return 0;
     if (!IS_STRING_ITEM(item->fType)) return 0;
     if (!str || !nMaxSiz) return strlenW(item->text);
@@ -3349,8 +3341,7 @@ INT WINAPI GetMenuStringW( HMENU hMenu, UINT wItemID,
 {
     MENUITEM *item;
 
-    TRACE("menu=%04x item=%04x ptr=%p len=%d flags=%04x\n",
-                 hMenu, wItemID, str, nMaxSiz, wFlags );
+    TRACE("menu=%p item=%04x ptr=%p len=%d flags=%04x\n", hMenu, wItemID, str, nMaxSiz, wFlags );
     if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return 0;
     if (!IS_STRING_ITEM(item->fType)) return 0;
     if (!str || !nMaxSiz) return strlenW(item->text);
@@ -3367,8 +3358,7 @@ BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID,
                                 UINT wHilite )
 {
     LPPOPUPMENU menu;
-    TRACE("(%04x, %04x, %04x, %04x);\n",
-                 hWnd, hMenu, wItemID, wHilite);
+    TRACE("(%p, %p, %04x, %04x);\n", hWnd, hMenu, wItemID, wHilite);
     if (!MENU_FindItem( &hMenu, &wItemID, wHilite )) return FALSE;
     if (!(menu = MENU_GetMenu(hMenu))) return FALSE;
     if (menu->FocusedItem == wItemID) return TRUE;
@@ -3384,8 +3374,7 @@ BOOL WINAPI HiliteMenuItem( HWND hWnd, HMENU hMenu, UINT wItemID,
 UINT WINAPI GetMenuState( HMENU hMenu, UINT wItemID, UINT wFlags )
 {
     MENUITEM *item;
-    TRACE("(menu=%04x, id=%04x, flags=%04x);\n",
-		 hMenu, wItemID, wFlags);
+    TRACE("(menu=%p, id=%04x, flags=%04x);\n", hMenu, wItemID, wFlags);
     if (!(item = MENU_FindItem( &hMenu, &wItemID, wFlags ))) return -1;
     debug_print_menuitem ("  item: ", item, "");
     if (item->fType & MF_POPUP)
@@ -3411,8 +3400,7 @@ INT WINAPI GetMenuItemCount( HMENU hMenu )
 {
     LPPOPUPMENU	menu = MENU_GetMenu(hMenu);
     if (!menu) return -1;
-    TRACE("(%04x) returning %d\n",
-                  hMenu, menu->nItems );
+    TRACE("(%p) returning %d\n", hMenu, menu->nItems );
     return menu->nItems;
 }
 
@@ -3440,12 +3428,10 @@ BOOL WINAPI InsertMenuW( HMENU hMenu, UINT pos, UINT flags,
     MENUITEM *item;
 
     if (IS_STRING_ITEM(flags) && str)
-        TRACE("hMenu %04x, pos %d, flags %08x, "
-		      "id %04x, str %s\n",
-                      hMenu, pos, flags, id, debugstr_w(str) );
-    else TRACE("hMenu %04x, pos %d, flags %08x, "
-		       "id %04x, str %08lx (not a string)\n",
-                       hMenu, pos, flags, id, (DWORD)str );
+        TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %s\n",
+              hMenu, pos, flags, id, debugstr_w(str) );
+    else TRACE("hMenu %p, pos %d, flags %08x, id %04x, str %08lx (not a string)\n",
+               hMenu, pos, flags, id, (DWORD)str );
 
     if (!(item = MENU_InsertItem( hMenu, pos, flags ))) return FALSE;
 
@@ -3515,7 +3501,7 @@ BOOL WINAPI RemoveMenu( HMENU hMenu, UINT nPos, UINT wFlags )
     LPPOPUPMENU	menu;
     MENUITEM *item;
 
-    TRACE("(menu=%04x pos=%04x flags=%04x)\n",hMenu, nPos, wFlags);
+    TRACE("(menu=%p pos=%04x flags=%04x)\n",hMenu, nPos, wFlags);
     if (!(item = MENU_FindItem( &hMenu, &nPos, wFlags ))) return FALSE;
     if (!(menu = MENU_GetMenu(hMenu))) return FALSE;
 
@@ -3567,14 +3553,12 @@ BOOL WINAPI ModifyMenuW( HMENU hMenu, UINT pos, UINT flags,
 
     if (IS_STRING_ITEM(flags))
     {
-	TRACE("%04x %d %04x %04x %s\n",
-                      hMenu, pos, flags, id, debugstr_w(str) );
+        TRACE("%p %d %04x %04x %s\n", hMenu, pos, flags, id, debugstr_w(str) );
         if (!str) return FALSE;
     }
     else
     {
-	TRACE("%04x %d %04x %04x %08lx\n",
-                      hMenu, pos, flags, id, (DWORD)str );
+        TRACE("%p %d %04x %04x %08lx\n", hMenu, pos, flags, id, (DWORD)str );
     }
 
     if (!(item = MENU_FindItem( &hMenu, &pos, flags ))) return FALSE;
@@ -3639,8 +3623,8 @@ BOOL WINAPI SetMenuItemBitmaps( HMENU hMenu, UINT nPos, UINT wFlags,
                                     HBITMAP hNewUnCheck, HBITMAP hNewCheck)
 {
     MENUITEM *item;
-    TRACE("(%04x, %04x, %04x, %04x, %04x)\n",
-                 hMenu, nPos, wFlags, hNewCheck, hNewUnCheck);
+    TRACE("(%p, %04x, %04x, %p, %p)\n",
+          hMenu, nPos, wFlags, hNewCheck, hNewUnCheck);
     if (!(item = MENU_FindItem( &hMenu, &nPos, wFlags ))) return FALSE;
 
     if (!hNewCheck && !hNewUnCheck)
@@ -3672,7 +3656,7 @@ HMENU WINAPI CreateMenu(void)
     menu->FocusedItem = NO_SELECTED_ITEM;
     menu->bTimeToHide = FALSE;
 
-    TRACE("return %04x\n", hMenu );
+    TRACE("return %p\n", hMenu );
 
     return hMenu;
 }
@@ -3683,7 +3667,7 @@ HMENU WINAPI CreateMenu(void)
  */
 BOOL WINAPI DestroyMenu( HMENU hMenu )
 {
-    TRACE("(%04x)\n", hMenu);
+    TRACE("(%p)\n", hMenu);
 
     /* Silently ignore attempts to destroy default system popup */
 
@@ -3745,7 +3729,7 @@ HMENU WINAPI GetSystemMenu( HWND hWnd, BOOL bRevert )
 		}
 		else
 		{
-		   WARN("Current sys-menu (%04x) of wnd %04x is broken\n",
+		   WARN("Current sys-menu (%p) of wnd %p is broken\n",
 			wndPtr->hSysMenu, hWnd);
 		   wndPtr->hSysMenu = 0;
 		}
@@ -3796,7 +3780,7 @@ BOOL WINAPI SetSystemMenu( HWND hwnd, HMENU hMenu )
 HMENU WINAPI GetMenu( HWND hWnd )
 {
     HMENU retvalue = (HMENU)GetWindowLongA( hWnd, GWL_ID );
-    TRACE("for %04x returning %04x\n", hWnd, retvalue);
+    TRACE("for %p returning %p\n", hWnd, retvalue);
     return retvalue;
 }
 
@@ -3806,11 +3790,11 @@ HMENU WINAPI GetMenu( HWND hWnd )
  */
 BOOL WINAPI SetMenu( HWND hWnd, HMENU hMenu )
 {
-    TRACE("(%04x, %04x);\n", hWnd, hMenu);
+    TRACE("(%p, %p);\n", hWnd, hMenu);
 
     if (hMenu && !IsMenu(hMenu))
     {
-        WARN("hMenu %x is not a menu handle\n", hMenu);
+        WARN("hMenu %p is not a menu handle\n", hMenu);
         return FALSE;
     }
     if (GetWindowLongA( hWnd, GWL_STYLE ) & WS_CHILD) return FALSE;
@@ -3879,7 +3863,7 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
  */
 DWORD WINAPI DrawMenuBarTemp(HWND someHWND, HDC someHDC, LPRECT someRECT, HMENU someHMENU, HFONT someFONT)
 {
-    FIXME("(0x%08x, 0x%08x, %p, 0x%08x, 0x%08x): stub\n", someHWND, someHDC, someRECT, someHMENU, someFONT);
+    FIXME("(%p, %p, %p, %p, %p): stub\n", someHWND, someHDC, someRECT, someHMENU, someFONT);
     return 0;
 }
 
@@ -4301,7 +4285,7 @@ BOOL WINAPI SetMenuDefaultItem(HMENU hmenu, UINT uItem, UINT bypos)
 	POPUPMENU *menu;
 	MENUITEM *item;
 
-	TRACE("(0x%x,%d,%d)\n", hmenu, uItem, bypos);
+	TRACE("(%p,%d,%d)\n", hmenu, uItem, bypos);
 
 	if (!(menu = MENU_GetMenu(hmenu))) return FALSE;
 
@@ -4349,7 +4333,7 @@ UINT WINAPI GetMenuDefaultItem(HMENU hmenu, UINT bypos, UINT flags)
 	MENUITEM * item;
 	UINT i = 0;
 
-	TRACE("(0x%x,%d,%d)\n", hmenu, bypos, flags);
+	TRACE("(%p,%d,%d)\n", hmenu, bypos, flags);
 
 	if (!(menu = MENU_GetMenu(hmenu))) return -1;
 
@@ -4414,8 +4398,7 @@ BOOL WINAPI CheckMenuRadioItem(HMENU hMenu,
      MENUITEM *mifirst, *milast, *micheck;
      HMENU mfirst = hMenu, mlast = hMenu, mcheck = hMenu;
 
-     TRACE("ox%x: %d-%d, check %d, bypos=%d\n",
-		  hMenu, first, last, check, bypos);
+     TRACE("%p: %d-%d, check %d, bypos=%d\n", hMenu, first, last, check, bypos);
 
      mifirst = MENU_FindItem (&mfirst, &first, bypos);
      milast = MENU_FindItem (&mlast, &last, bypos);
@@ -4458,7 +4441,7 @@ BOOL WINAPI GetMenuItemRect (HWND hwnd, HMENU hMenu, UINT uItem,
      MENUITEM *item;
      HWND referenceHwnd;
 
-     TRACE("(0x%x,0x%x,%d,%p)\n", hwnd, hMenu, uItem, rect);
+     TRACE("(%p,%p,%d,%p)\n", hwnd, hMenu, uItem, rect);
 
      item = MENU_FindItem (&hMenu, &uItem, MF_BYPOSITION);
      referenceHwnd = hwnd;
@@ -4496,7 +4479,7 @@ BOOL WINAPI SetMenuInfo (HMENU hMenu, LPCMENUINFO lpmi)
 {
     POPUPMENU *menu;
 
-    TRACE("(0x%04x %p)\n", hMenu, lpmi);
+    TRACE("(%p %p)\n", hMenu, lpmi);
 
     if (lpmi && (lpmi->cbSize==sizeof(MENUINFO)) && (menu = MENU_GetMenu(hMenu)))
     {
@@ -4531,7 +4514,7 @@ BOOL WINAPI SetMenuInfo (HMENU hMenu, LPCMENUINFO lpmi)
 BOOL WINAPI GetMenuInfo (HMENU hMenu, LPMENUINFO lpmi)
 {   POPUPMENU *menu;
 
-    TRACE("(0x%04x %p)\n", hMenu, lpmi);
+    TRACE("(%p %p)\n", hMenu, lpmi);
 
     if (lpmi && (menu = MENU_GetMenu(hMenu)))
     {
@@ -4564,7 +4547,7 @@ BOOL WINAPI SetMenuContextHelpId( HMENU hMenu, DWORD dwContextHelpID)
 {
     LPPOPUPMENU menu;
 
-    TRACE("(0x%04x 0x%08lx)\n", hMenu, dwContextHelpID);
+    TRACE("(%p 0x%08lx)\n", hMenu, dwContextHelpID);
 
     if ((menu = MENU_GetMenu(hMenu)))
     {
@@ -4582,7 +4565,7 @@ DWORD WINAPI GetMenuContextHelpId( HMENU hMenu )
 {
     LPPOPUPMENU menu;
 
-    TRACE("(0x%04x)\n", hMenu);
+    TRACE("(%p)\n", hMenu);
 
     if ((menu = MENU_GetMenu(hMenu)))
     {
@@ -4677,7 +4660,7 @@ static BOOL translate_accelerator( HWND hWnd, UINT message, WPARAM wParam, LPARA
             if(hSubMenu != hSysMenu)
             {
                 nPos = MENU_FindSubMenu(&hSysMenu, hSubMenu);
-                TRACE_(accel)("hSysMenu = %04x, hSubMenu = %04x, nPos = %d\n", hSysMenu, hSubMenu, nPos);
+                TRACE_(accel)("hSysMenu = %p, hSubMenu = %p, nPos = %d\n", hSysMenu, hSubMenu, nPos);
                 SendMessageA(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, TRUE));
             }
             uSysStat = GetMenuState(GetSubMenu(hSysMenu, 0), cmd, MF_BYCOMMAND);
@@ -4692,7 +4675,7 @@ static BOOL translate_accelerator( HWND hWnd, UINT message, WPARAM wParam, LPARA
                 if(hSubMenu != hMenu)
                 {
                     nPos = MENU_FindSubMenu(&hMenu, hSubMenu);
-                    TRACE_(accel)("hMenu = %04x, hSubMenu = %04x, nPos = %d\n", hMenu, hSubMenu, nPos);
+                    TRACE_(accel)("hMenu = %p, hSubMenu = %p, nPos = %d\n", hMenu, hSubMenu, nPos);
                     SendMessageA(hWnd, WM_INITMENUPOPUP, (WPARAM)hSubMenu, MAKELPARAM(nPos, FALSE));
                 }
                 uStat = GetMenuState(hMenu, cmd, MF_BYCOMMAND);
@@ -4771,7 +4754,7 @@ INT WINAPI TranslateAccelerator( HWND hWnd, HACCEL hAccel, LPMSG msg )
     }
     if (!hAccel || !(lpAccelTbl = (LPACCEL16) LockResource16(HACCEL_16(hAccel))))
     {
-        WARN_(accel)("invalid accel handle=%x\n", hAccel);
+        WARN_(accel)("invalid accel handle=%p\n", hAccel);
         return 0;
     }
     if ((msg->message != WM_KEYDOWN &&
@@ -4780,8 +4763,8 @@ INT WINAPI TranslateAccelerator( HWND hWnd, HACCEL hAccel, LPMSG msg )
          msg->message != WM_SYSKEYUP &&
          msg->message != WM_CHAR)) return 0;
 
-    TRACE_(accel)("TranslateAccelerators hAccel=%04x, hWnd=%04x,"
-                  "msg->hwnd=%04x, msg->message=%04x, wParam=%08x, lParam=%lx\n",
+    TRACE_(accel)("TranslateAccelerators hAccel=%p, hWnd=%p,"
+                  "msg->hwnd=%p, msg->message=%04x, wParam=%08x, lParam=%lx\n",
                   hAccel,hWnd,msg->hwnd,msg->message,msg->wParam,msg->lParam);
 
     i = 0;
diff --git a/controls/scroll.c b/controls/scroll.c
index 72e2c6222e3..be40ab6736d 100644
--- a/controls/scroll.c
+++ b/controls/scroll.c
@@ -973,7 +973,7 @@ static void SCROLL_HandleScrollEvent( HWND hwnd, INT nBar, UINT msg, POINT pt)
           return;  /* Should never happen */
     }
 
-    TRACE("Event: hwnd=%04x bar=%d msg=%s pt=%ld,%ld hit=%d\n",
+    TRACE("Event: hwnd=%p bar=%d msg=%s pt=%ld,%ld hit=%d\n",
           hwnd, nBar, SPY_GetMsgName(msg,hwnd), pt.x, pt.y, hittest );
 
     switch(SCROLL_trackHitTest)
@@ -1236,7 +1236,7 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
             }
         }
         if (!hUpArrow) SCROLL_LoadBitmaps();
-        TRACE("ScrollBar creation, hwnd=%04x\n", hwnd );
+        TRACE("ScrollBar creation, hwnd=%p\n", hwnd );
         return 0;
 
     case WM_ENABLE:
@@ -1464,7 +1464,7 @@ INT SCROLL_SetScrollInfo( HWND hwnd, INT nBar,
 
     if (TRACE_ON(scroll))
     {
-        TRACE("hwnd=%04x bar=%d", hwnd, nBar);
+        TRACE("hwnd=%p bar=%d", hwnd, nBar);
         if (info->fMask & SIF_PAGE) DPRINTF( " page=%d", info->nPage );
         if (info->fMask & SIF_POS) DPRINTF( " pos=%d", info->nPos );
         if (info->fMask & SIF_RANGE) DPRINTF( " min=%d max=%d", info->nMin, info->nMax );
@@ -1761,8 +1761,7 @@ BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar,
 {
     LONG style = GetWindowLongW( hwnd, GWL_STYLE );
 
-    TRACE("hwnd=%04x bar=%d horz=%d, vert=%d\n",
-                    hwnd, nBar, fShowH, fShowV );
+    TRACE("hwnd=%p bar=%d horz=%d, vert=%d\n", hwnd, nBar, fShowH, fShowV );
 
     switch(nBar)
     {
@@ -1842,7 +1841,7 @@ BOOL WINAPI EnableScrollBar( HWND hwnd, INT nBar, UINT flags )
     BOOL bFineWithMe;
     SCROLLBAR_INFO *infoPtr;
 
-    TRACE("%04x %d %d\n", hwnd, nBar, flags );
+    TRACE("%p %d %d\n", hwnd, nBar, flags );
 
     flags &= ESB_DISABLE_BOTH;
 
diff --git a/controls/uitools.c b/controls/uitools.c
index 7171f7f419f..abc06400c16 100644
--- a/controls/uitools.c
+++ b/controls/uitools.c
@@ -580,8 +580,8 @@ static BOOL UITOOLS95_DrawRectEdge(HDC hdc, LPRECT rc,
  */
 BOOL WINAPI DrawEdge( HDC hdc, LPRECT rc, UINT edge, UINT flags )
 {
-    TRACE("%04x %d,%d-%d,%d %04x %04x\n",
-	  hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
+    TRACE("%p %d,%d-%d,%d %04x %04x\n",
+          hdc, rc->left, rc->top, rc->right, rc->bottom, edge, flags );
 
     if(flags & BF_DIAGONAL)
       return UITOOLS95_DrawDiagEdge(hdc, rc, edge, flags);
@@ -1392,8 +1392,7 @@ BOOL WINAPI DrawFrameControl( HDC hdc, LPRECT rc, UINT uType,
     case DFC_SCROLL:
       return UITOOLS95_DrawFrameScroll(hdc, rc, uState);
     default:
-      WARN("(%x,%p,%d,%x), bad type!\n",
-	   hdc,rc,uType,uState );
+      WARN("(%p,%p,%d,%x), bad type!\n", hdc,rc,uType,uState );
     }
     return FALSE;
 }
diff --git a/dlls/user/Makefile.in b/dlls/user/Makefile.in
index d03aa369555..95fdd79d20e 100644
--- a/dlls/user/Makefile.in
+++ b/dlls/user/Makefile.in
@@ -1,4 +1,4 @@
-EXTRADEFS = -D_USER32_ -D_WINABLE_ -DWINE_NO_STRICT
+EXTRADEFS = -D_USER32_ -D_WINABLE_
 TOPSRCDIR = @top_srcdir@
 TOPOBJDIR = ../..
 SRCDIR    = @srcdir@
diff --git a/dlls/user/caret.c b/dlls/user/caret.c
index 0d14194db42..f16de2bd77d 100644
--- a/dlls/user/caret.c
+++ b/dlls/user/caret.c
@@ -112,7 +112,7 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap, INT width, INT height )
     HBITMAP hBmp = 0;
     HWND prev = 0;
 
-    TRACE("hwnd=%04x\n", hwnd);
+    TRACE("hwnd=%p\n", hwnd);
 
     if (!hwnd) return FALSE;
 
diff --git a/dlls/user/comm16.c b/dlls/user/comm16.c
index c789c3a6837..2548207a08e 100644
--- a/dlls/user/comm16.c
+++ b/dlls/user/comm16.c
@@ -317,7 +317,7 @@ static VOID WINAPI COMM16_ReadComplete(DWORD status, DWORD len, LPOVERLAPPED ov)
 
 	/* send notifications, if any */
 	if (ptr->wnd && mask) {
-		TRACE("notifying %04x: cid=%d, mask=%02x\n", ptr->wnd, cid, mask);
+		TRACE("notifying %p: cid=%d, mask=%02x\n", ptr->wnd, cid, mask);
 		PostMessageA(ptr->wnd, WM_COMMNOTIFY, cid, mask);
 	}
 
@@ -395,7 +395,7 @@ static VOID WINAPI COMM16_WriteComplete(DWORD status, DWORD len, LPOVERLAPPED ov
 
 	/* send notifications, if any */
 	if (ptr->wnd && mask) {
-		TRACE("notifying %04x: cid=%d, mask=%02x\n", ptr->wnd, cid, mask);
+		TRACE("notifying %p: cid=%d, mask=%02x\n", ptr->wnd, cid, mask);
 		PostMessageA(ptr->wnd, WM_COMMNOTIFY, cid, mask);
 	}
 
diff --git a/dlls/user/dde/client.c b/dlls/user/dde/client.c
index 3eda3cff84d..7c7227c2f1c 100644
--- a/dlls/user/dde/client.c
+++ b/dlls/user/dde/client.c
@@ -60,7 +60,7 @@ const WCHAR WDML_szClientConvClassW[] = {'D','d','e','C','l','i','e','n','t','U'
 HCONVLIST WINAPI DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic,
 				HCONVLIST hConvList, LPCONVCONTEXT pCC)
 {
-    FIXME("(%ld,%d,%d,%d,%p): stub\n", idInst, hszService, hszTopic, hConvList, pCC);
+    FIXME("(%ld,%p,%p,%p,%p): stub\n", idInst, hszService, hszTopic, hConvList, pCC);
     return (HCONVLIST)1;
 }
 
@@ -69,7 +69,7 @@ HCONVLIST WINAPI DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic,
  */
 HCONV WINAPI DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev)
 {
-    FIXME("(%d,%d): stub\n", hConvList, hConvPrev);
+    FIXME("(%p,%p): stub\n", hConvList, hConvPrev);
     return 0;
 }
 
@@ -86,7 +86,7 @@ HCONV WINAPI DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev)
  */
 BOOL WINAPI DdeDisconnectList(HCONVLIST hConvList)
 {
-    FIXME("(%d): stub\n", hConvList);
+    FIXME("(%p): stub\n", hConvList);
     return TRUE;
 }
 
@@ -101,7 +101,7 @@ HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
     WDML_CONV*		pConv = NULL;
     ATOM		aSrv = 0, aTpc = 0;
 
-    TRACE("(0x%lx,0x%x,0x%x,%p)\n", idInst, hszService, hszTopic, pCC);
+    TRACE("(0x%lx,%p,%p,%p)\n", idInst, hszService, hszTopic, pCC);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -201,7 +201,7 @@ HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic,
 	pConv = NULL;
 	goto theEnd;
     }
-    TRACE("Connected to Server window (%x)\n", pConv->hwndServer);
+    TRACE("Connected to Server window (%p)\n", pConv->hwndServer);
     pConv->wConvst = XST_CONNECTED;
 
     /* finish init of pConv */
@@ -1087,8 +1087,8 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
     WDML_XACT*		pXAct;
     HDDEDATA		hDdeData = 0;
 
-    TRACE("(%p,%ld,0x%lx,0x%x,%d,%d,%ld,%p)\n",
-	  pData, cbData, (DWORD)hConv, hszItem, wFmt, wType, dwTimeout, pdwResult);
+    TRACE("(%p,%ld,%p,%p,%d,%d,%ld,%p)\n",
+	  pData, cbData, hConv, hszItem, wFmt, wType, dwTimeout, pdwResult);
 
     if (hConv == 0)
     {
@@ -1162,7 +1162,7 @@ HDDEDATA WINAPI DdeClientTransaction(LPBYTE pData, DWORD cbData, HCONV hConv, HS
 
     if (!PostMessageA(pConv->hwndServer, pXAct->ddeMsg, (WPARAM)pConv->hwndClient, pXAct->lParam))
     {
-	TRACE("Failed posting message %d to 0x%04x (error=0x%lx)\n",
+	TRACE("Failed posting message %d to %p (error=0x%lx)\n",
 	      pXAct->ddeMsg, pConv->hwndServer, GetLastError());
 	pConv->wStatus &= ~ST_CONNECTED;
 	WDML_UnQueueTransaction(pConv, pXAct);
diff --git a/dlls/user/dde/misc.c b/dlls/user/dde/misc.c
index 5bb75b25464..756dd4eeead 100644
--- a/dlls/user/dde/misc.c
+++ b/dlls/user/dde/misc.c
@@ -82,7 +82,7 @@ LPARAM WINAPI PackDDElParam(UINT msg, UINT uiLo, UINT uiHi)
         }
         if (!(params = GlobalLock(hMem)))
         {
-            ERR("GlobalLock failed (%x)\n", hMem);
+            ERR("GlobalLock failed (%p)\n", hMem);
             return 0;
         }
         params[0] = uiLo;
@@ -224,7 +224,7 @@ LPARAM WINAPI ReuseDDElParam(LPARAM lParam, UINT msgIn, UINT msgOut,
  */
 BOOL WINAPI ImpersonateDdeClientWindow(HWND hWndClient, HWND hWndServer)
 {
-     FIXME("(%04x %04x): stub\n", hWndClient, hWndServer);
+     FIXME("(%p %p): stub\n", hWndClient, hWndServer);
      return FALSE;
 }
 
@@ -235,7 +235,7 @@ BOOL WINAPI ImpersonateDdeClientWindow(HWND hWndClient, HWND hWndServer)
 BOOL WINAPI DdeSetQualityOfService(HWND hwndClient, CONST SECURITY_QUALITY_OF_SERVICE *pqosNew,
 				   PSECURITY_QUALITY_OF_SERVICE pqosPrev)
 {
-     FIXME("(%04x %p %p): stub\n", hwndClient, pqosNew, pqosPrev);
+     FIXME("(%p %p %p): stub\n", hwndClient, pqosNew, pqosPrev);
      return TRUE;
 }
 
@@ -716,9 +716,9 @@ HDDEDATA 	WDML_InvokeCallback(WDML_INSTANCE* pInstance, UINT uType, UINT uFmt, H
 
     if (pInstance == NULL)
 	return (HDDEDATA)0;
-    TRACE("invoking CB%d[%08lx] (%u %u %08lx 0x%x 0x%x %u %lu %lu)\n",
-	  pInstance->win16 ? 16 : 32, (DWORD)pInstance->callback, uType, uFmt,
-	  (DWORD)hConv, hsz1, hsz2, hdata, dwData1, dwData2);
+    TRACE("invoking CB%d[%p] (%u %u %p %p %p %p %lu %lu)\n",
+	  pInstance->win16 ? 16 : 32, pInstance->callback, uType, uFmt,
+	  hConv, hsz1, hsz2, hdata, dwData1, dwData2);
     if (pInstance->win16)
     {
 	ret = WDML_InvokeCallback16(pInstance->callback, uType, uFmt, hConv,
@@ -826,7 +826,7 @@ static HSZNode*	WDML_FindNode(WDML_INSTANCE* pInstance, HSZ hsz)
     {
 	if (pNode->hsz == hsz) break;
     }
-    if (!pNode) WARN("HSZ 0x%x not found\n", hsz);
+    if (!pNode) WARN("HSZ %p not found\n", hsz);
     return pNode;
 }
 
@@ -842,7 +842,7 @@ ATOM	WDML_MakeAtomFromHsz(HSZ hsz)
 
     if (GetAtomNameW(HSZ2ATOM(hsz), nameBuffer, MAX_BUFFER_LEN))
 	return GlobalAddAtomW(nameBuffer);
-    WARN("HSZ 0x%x not found\n", hsz);
+    WARN("HSZ %p not found\n", hsz);
     return 0;
 }
 
@@ -919,7 +919,7 @@ BOOL WDML_DecHSZ(WDML_INSTANCE* pInstance, HSZ hsz)
 	    return TRUE;
 	}
     }
-    WARN("HSZ 0x%x not found\n", hsz);
+    WARN("HSZ %p not found\n", hsz);
 
     return FALSE;
 }
@@ -1008,7 +1008,7 @@ DWORD WINAPI DdeQueryStringA(DWORD idInst, HSZ hsz, LPSTR psz, DWORD cchMax, INT
     DWORD		ret = 0;
     WDML_INSTANCE*	pInstance;
 
-    TRACE("(%ld, 0x%x, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
+    TRACE("(%ld, %p, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -1035,7 +1035,7 @@ DWORD WINAPI DdeQueryStringW(DWORD idInst, HSZ hsz, LPWSTR psz, DWORD cchMax, IN
     DWORD		ret = 0;
     WDML_INSTANCE*	pInstance;
 
-    TRACE("(%ld, 0x%x, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
+    TRACE("(%ld, %p, %p, %ld, %d)\n", idInst, hsz, psz, cchMax, iCodePage);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -1066,11 +1066,11 @@ static	HSZ	WDML_CreateString(WDML_INSTANCE* pInstance, LPCVOID ptr, int codepage
     {
     case CP_WINANSI:
 	hsz = ATOM2HSZ(AddAtomA(ptr));
-	TRACE("added atom %s with HSZ 0x%x, \n", debugstr_a(ptr), hsz);
+	TRACE("added atom %s with HSZ %p, \n", debugstr_a(ptr), hsz);
 	break;
     case CP_WINUNICODE:
 	hsz = ATOM2HSZ(AddAtomW(ptr));
-	TRACE("added atom %s with HSZ 0x%x, \n", debugstr_w(ptr), hsz);
+	TRACE("added atom %s with HSZ %p, \n", debugstr_w(ptr), hsz);
 	break;
     default:
 	ERR("Unknown code page %d\n", codepage);
@@ -1149,7 +1149,7 @@ BOOL WINAPI DdeFreeStringHandle(DWORD idInst, HSZ hsz)
     WDML_INSTANCE*	pInstance;
     BOOL		ret = FALSE;
 
-    TRACE("(%ld,0x%x): \n", idInst, hsz);
+    TRACE("(%ld,%p): \n", idInst, hsz);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -1175,7 +1175,7 @@ BOOL WINAPI DdeKeepStringHandle(DWORD idInst, HSZ hsz)
     WDML_INSTANCE*	pInstance;
     BOOL		ret = FALSE;
 
-    TRACE("(%ld,0x%x): \n", idInst, hsz);
+    TRACE("(%ld,%p): \n", idInst, hsz);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -1210,7 +1210,7 @@ INT WINAPI DdeCmpStringHandles(HSZ hsz1, HSZ hsz2)
     ret1 = GetAtomNameW(HSZ2ATOM(hsz1), psz1, MAX_BUFFER_LEN);
     ret2 = GetAtomNameW(HSZ2ATOM(hsz2), psz2, MAX_BUFFER_LEN);
 
-    TRACE("(%x<%s> %x<%s>);\n", hsz1, debugstr_w(psz1), hsz2, debugstr_w(psz2));
+    TRACE("(%p<%s> %p<%s>);\n", hsz1, debugstr_w(psz1), hsz2, debugstr_w(psz2));
 
     /* Make sure we found both strings. */
     if (ret1 == 0 && ret2 == 0)
@@ -1397,7 +1397,7 @@ LPBYTE WINAPI DdeAccessData(HDDEDATA hData, LPDWORD pcbDataSize)
     pDdh = (DDE_DATAHANDLE_HEAD*)GlobalLock(hMem);
     if (pDdh == NULL)
     {
-	ERR("Failed on GlobalLock(%04x)\n", hMem);
+	ERR("Failed on GlobalLock(%p)\n", hMem);
 	return 0;
     }
 
@@ -1826,7 +1826,7 @@ void WDML_RemoveConv(WDML_CONV* pRef, WDML_SIDE side)
  */
 BOOL WINAPI DdeEnableCallback(DWORD idInst, HCONV hConv, UINT wCmd)
 {
-    FIXME("(%ld, 0x%x, %d) stub\n", idInst, hConv, wCmd);
+    FIXME("(%ld, %p, %d) stub\n", idInst, hConv, wCmd);
 
     return 0;
 }
diff --git a/dlls/user/dde/server.c b/dlls/user/dde/server.c
index 33dee61fd7b..3809e73f40d 100644
--- a/dlls/user/dde/server.c
+++ b/dlls/user/dde/server.c
@@ -67,7 +67,7 @@ BOOL WINAPI DdePostAdvise(DWORD idInst, HSZ hszTopic, HSZ hszItem)
     ATOM		atom = 0;
     UINT		count;
 
-    TRACE("(%ld,0x%x,0x%x)\n", idInst, hszTopic, hszItem);
+    TRACE("(%ld,%p,%p)\n", idInst, hszTopic, hszItem);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -176,7 +176,7 @@ HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd)
 
     hDdeData = (HDDEDATA)NULL;
 
-    TRACE("(%ld,0x%x,0x%x,%d)\n", idInst, hsz1, hsz2, afCmd);
+    TRACE("(%ld,%p,%p,%d)\n", idInst, hsz1, hsz2, afCmd);
 
     EnterCriticalSection(&WDML_CritSect);
 
@@ -251,7 +251,7 @@ HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd)
 
 	SetWindowLongA(hwndServer, GWL_WDML_INSTANCE, (DWORD)pInstance);
 	SetWindowLongA(hwndServer, GWL_WDML_SERVER, (DWORD)pServer);
-	TRACE("Created nameServer=%04x for instance=%08lx\n", hwndServer, idInst);
+	TRACE("Created nameServer=%p for instance=%08lx\n", hwndServer, idInst);
 
 	pServer->hwndServer = hwndServer;
 	break;
@@ -356,7 +356,7 @@ static WDML_CONV* WDML_CreateServerConv(WDML_INSTANCE* pInstance, HWND hwndClien
 				       hwndServerName, 0, 0, 0);
     }
 
-    TRACE("Created convServer=%04x (nameServer=%04x) for instance=%08lx\n",
+    TRACE("Created convServer=%p (nameServer=%p) for instance=%08lx\n",
 	  hwndServerConv, hwndServerName, pInstance->instanceID);
 
     pConv = WDML_AddConv(pInstance, WDML_SERVER_SIDE, hszApp, hszTopic,
diff --git a/dlls/user/focus.c b/dlls/user/focus.c
index 7a18f12688a..46e446bd94f 100644
--- a/dlls/user/focus.c
+++ b/dlls/user/focus.c
@@ -218,7 +218,7 @@ HWND WINAPI SetActiveWindow( HWND hwnd )
 {
     HWND prev;
 
-    TRACE( "%x\n", hwnd );
+    TRACE( "%p\n", hwnd );
 
     if (hwnd)
     {
@@ -243,7 +243,7 @@ HWND WINAPI SetFocus( HWND hwnd )
     HWND hwndTop = hwnd;
     HWND previous = GetFocus();
 
-    TRACE( "%x prev %x\n", hwnd, previous );
+    TRACE( "%p prev %p\n", hwnd, previous );
 
     if (hwnd)
     {
@@ -286,7 +286,7 @@ HWND WINAPI SetFocus( HWND hwnd )
  */
 BOOL WINAPI SetForegroundWindow( HWND hwnd )
 {
-    TRACE( "%x\n", hwnd );
+    TRACE( "%p\n", hwnd );
     if (hwnd) hwnd = WIN_GetFullHandle( hwnd );
     return set_foreground_window( hwnd, FALSE );
 }
diff --git a/dlls/user/hook.c b/dlls/user/hook.c
index 43b7022e737..6ca44601b79 100644
--- a/dlls/user/hook.c
+++ b/dlls/user/hook.c
@@ -145,7 +145,7 @@ static HHOOK set_windows_hook( INT id, HOOKPROC proc, HINSTANCE inst, DWORD tid,
     }
     SERVER_END_REQ;
 
-    TRACE( "%s %p %lx -> %x\n", hook_names[id-WH_MINHOOK], proc, tid, handle );
+    TRACE( "%s %p %lx -> %p\n", hook_names[id-WH_MINHOOK], proc, tid, handle );
     return handle;
 }
 
@@ -380,7 +380,7 @@ BOOL WINAPI UnhookWindowsHookEx( HHOOK hhook )
 {
     BOOL ret;
 
-    TRACE( "%x\n", hhook );
+    TRACE( "%p\n", hhook );
 
     SERVER_START_REQ( remove_hook )
     {
@@ -481,7 +481,7 @@ HWINEVENTHOOK WINAPI SetWinEventHook(DWORD dwMin, DWORD dwMax, HMODULE hModule,
                                      WINEVENTPROC pfnProc, DWORD dwProcess,
                                      DWORD dwThread, DWORD dwFlags)
 {
-    FIXME("(%ld,%ld,0x%08x,%p,%ld,%ld,0x%08lx)-stub!\n", dwMin, dwMax, hModule,
+    FIXME("(%ld,%ld,%p,%p,%ld,%ld,0x%08lx)-stub!\n", dwMin, dwMax, hModule,
           pfnProc, dwProcess, dwThread, dwFlags);
     return 0;
 }
@@ -504,7 +504,7 @@ HWINEVENTHOOK WINAPI SetWinEventHook(DWORD dwMin, DWORD dwMax, HMODULE hModule,
  */
 BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hEventHook)
 {
-    FIXME("(%x)-stub!\n", hEventHook);
+    FIXME("(%p)-stub!\n", hEventHook);
 
     return (hEventHook != 0);
 }
@@ -529,7 +529,7 @@ BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK hEventHook)
  */
 void WINAPI NotifyWinEvent(DWORD dwEvent, HWND hWnd, LONG nId, LONG nChildId)
 {
-    FIXME("(%ld,0x%08x,%ld,%ld)-stub!\n", dwEvent, hWnd, nId, nChildId);
+    FIXME("(%ld,%p,%ld,%ld)-stub!\n", dwEvent, hWnd, nId, nChildId);
 }
 
 
diff --git a/dlls/user/message.c b/dlls/user/message.c
index 9232eaae759..4ec5e00a147 100644
--- a/dlls/user/message.c
+++ b/dlls/user/message.c
@@ -1445,7 +1445,7 @@ BOOL MSG_peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags )
 
         if (res) return FALSE;
 
-        TRACE( "got type %d msg %x hwnd %x wp %x lp %lx\n",
+        TRACE( "got type %d msg %x hwnd %p wp %x lp %lx\n",
                info.type, info.msg.message, info.msg.hwnd, info.msg.wParam, info.msg.lParam );
 
         switch(info.type)
@@ -1465,7 +1465,7 @@ BOOL MSG_peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags )
             if (!unpack_message( info.msg.hwnd, info.msg.message, &info.msg.wParam,
                                  &info.msg.lParam, &buffer, size ))
             {
-                ERR( "invalid packed message %x (%s) hwnd %x wp %x lp %lx size %d\n",
+                ERR( "invalid packed message %x (%s) hwnd %p wp %x lp %lx size %d\n",
                      info.msg.message, SPY_GetMsgName(info.msg.message, info.msg.hwnd), info.msg.hwnd,
                      info.msg.wParam, info.msg.lParam, size );
                 /* ignore it */
@@ -1494,7 +1494,7 @@ BOOL MSG_peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, int flags )
 		if (!unpack_dde_message( info.msg.hwnd, info.msg.message, &info.msg.wParam,
                                          &info.msg.lParam, &buffer, size ))
 		{
-		    ERR( "invalid packed dde-message %x (%s) hwnd %x wp %x lp %lx size %d\n",
+		    ERR( "invalid packed dde-message %x (%s) hwnd %p wp %x lp %lx size %d\n",
 			 info.msg.message, SPY_GetMsgName(info.msg.message, info.msg.hwnd),
 			 info.msg.hwnd, info.msg.wParam, info.msg.lParam, size );
 		    /* ignore it */
@@ -1662,7 +1662,7 @@ static LRESULT retrieve_reply( const struct send_message_info *info,
 
     if (reply_data) HeapFree( GetProcessHeap(), 0, reply_data );
 
-    TRACE( "hwnd %x msg %x (%s) wp %x lp %lx got reply %lx (err=%ld)\n",
+    TRACE( "hwnd %p msg %x (%s) wp %x lp %lx got reply %lx (err=%ld)\n",
            info->hwnd, info->msg, SPY_GetMsgName(info->msg, info->hwnd), info->wparam,
            info->lparam, *result, status );
 
@@ -1683,7 +1683,7 @@ static LRESULT send_inter_thread_message( DWORD dest_tid, const struct send_mess
     int locks;
     size_t reply_size = 0;
 
-    TRACE( "hwnd %x msg %x (%s) wp %x lp %lx\n",
+    TRACE( "hwnd %p msg %x (%s) wp %x lp %lx\n",
            info->hwnd, info->msg, SPY_GetMsgName(info->msg, info->hwnd), info->wparam, info->lparam );
 
     if (!put_message_in_queue( dest_tid, info, &reply_size )) return 0;
diff --git a/dlls/user/misc.c b/dlls/user/misc.c
index 7c64997fd85..125066fe265 100644
--- a/dlls/user/misc.c
+++ b/dlls/user/misc.c
@@ -178,7 +178,7 @@ HANDLE WINAPI OpenDesktopA( LPCSTR lpszDesktop, DWORD dwFlags,
 BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
 				       LPVOID pvInfo, DWORD nLength )
 {
-    FIXME("(%x,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
+    FIXME("(%p,%d,%p,%lx): stub\n",hObj,nIndex,pvInfo,nLength);
     return TRUE;
 }
 
@@ -187,7 +187,7 @@ BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex,
  */
 BOOL WINAPI SetThreadDesktop( HANDLE hDesktop )
 {
-    FIXME("(%x): stub\n",hDesktop);
+    FIXME("(%p): stub\n",hDesktop);
     return TRUE;
 }
 
diff --git a/dlls/user/msg16.c b/dlls/user/msg16.c
index 243b23de04d..3d14a75375b 100644
--- a/dlls/user/msg16.c
+++ b/dlls/user/msg16.c
@@ -207,7 +207,7 @@ BOOL16 WINAPI GetMessage32_16( MSG32_16 *msg16, HWND16 hwnd16, UINT16 first,
                                   &msg16->msg.message, &msg16->msg.wParam,
                                   &msg16->msg.lParam ) == -1);
 
-    TRACE( "message %04x, hwnd %04x, filter(%04x - %04x)\n",
+    TRACE( "message %04x, hwnd %p, filter(%04x - %04x)\n",
            msg16->msg.message, hwnd, first, last );
 
     return msg16->msg.message != WM_QUIT;
@@ -282,7 +282,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
     if (wndPtr == WND_OTHER_PROCESS)
     {
         if (IsWindow( hwnd ))
-            ERR( "cannot dispatch msg to other process window %x\n", hwnd );
+            ERR( "cannot dispatch msg to other process window %p\n", hwnd );
         SetLastError( ERROR_INVALID_WINDOW_HANDLE );
         return 0;
     }
@@ -307,7 +307,7 @@ LONG WINAPI DispatchMessage16( const MSG16* msg )
         WIN_ReleasePtr( wndPtr );
         if (validate)
         {
-            ERR( "BeginPaint not called on WM_PAINT for hwnd %x!\n", hwnd );
+            ERR( "BeginPaint not called on WM_PAINT for hwnd %p!\n", hwnd );
             /* Validate the update region to avoid infinite WM_PAINT loop */
             RedrawWindow( hwnd, NULL, 0,
                           RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
diff --git a/dlls/user/painting.c b/dlls/user/painting.c
index 04e06fa9ec8..b39fd19008d 100644
--- a/dlls/user/painting.c
+++ b/dlls/user/painting.c
@@ -118,7 +118,7 @@ static HRGN begin_ncpaint( HWND hwnd )
 
     if (!wnd || wnd == WND_OTHER_PROCESS) return 0;
 
-    TRACE("hwnd %04x [%04x] ncf %i\n",
+    TRACE("hwnd %p [%p] ncf %i\n",
           hwnd, wnd->hrgnUpdate, wnd->flags & WIN_NEEDS_NCPAINT);
 
     get_update_regions( wnd, &whole_rgn, &client_rgn );
@@ -162,7 +162,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
     if (!(full_handle = WIN_IsCurrentThread( hwnd )))
     {
         if (IsWindow(hwnd))
-            FIXME( "window %x belongs to other thread\n", hwnd );
+            FIXME( "window %p belongs to other thread\n", hwnd );
         return 0;
     }
     hwnd = full_handle;
@@ -202,7 +202,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
 
     if (!lps->hdc)
     {
-        WARN("GetDCEx() failed in BeginPaint(), hwnd=%04x\n", hwnd);
+        WARN("GetDCEx() failed in BeginPaint(), hwnd=%p\n", hwnd);
         DeleteObject( hrgnUpdate );
         return 0;
     }
@@ -219,7 +219,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
     IntersectRect(&lps->rcPaint, &clientRect, &clipRect);
     DPtoLP(lps->hdc, (LPPOINT)&lps->rcPaint, 2);  /* we must return LP */
 
-    TRACE("hdc = %x box = (%i,%i - %i,%i)\n",
+    TRACE("hdc = %p box = (%i,%i - %i,%i)\n",
           lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom );
 
     if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) return 0;
diff --git a/dlls/user/resource.c b/dlls/user/resource.c
index 990ca9a87fc..2600339df25 100644
--- a/dlls/user/resource.c
+++ b/dlls/user/resource.c
@@ -105,7 +105,7 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE instance,LPCWSTR lpTableName)
 	accel16[i-1].fVirt |= 0x80;
       }
     }
-    TRACE_(accel)("returning HACCEL 0x%x\n", hRsrc);
+    TRACE_(accel)("returning HACCEL %p\n", hRsrc);
     return HACCEL_32(hRetval);
 }
 
@@ -218,7 +218,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
   /* Allocate memory and copy the table. */
   hAccel = HACCEL_32(GlobalAlloc16(0,cEntries*sizeof(ACCEL16)));
 
-  TRACE_(accel)("handle %x\n", hAccel);
+  TRACE_(accel)("handle %p\n", hAccel);
   if(!hAccel) {
     ERR_(accel)("Out of memory.\n");
     SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@@ -233,7 +233,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccel, INT cEntries)
   /* Set the end-of-table terminator. */
   accel[cEntries-1].fVirt |= 0x80;
 
-  TRACE_(accel)("Allocated accelerator handle %x\n", hAccel);
+  TRACE_(accel)("Allocated accelerator handle %p\n", hAccel);
   return hAccel;
 }
 
@@ -264,7 +264,7 @@ HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
   /* Allocate memory and copy the table. */
   hAccel = HACCEL_32(GlobalAlloc16(0,cEntries*sizeof(ACCEL16)));
 
-  TRACE_(accel)("handle %x\n", hAccel);
+  TRACE_(accel)("handle %p\n", hAccel);
   if(!hAccel) {
     ERR_(accel)("Out of memory.\n");
     SetLastError(ERROR_NOT_ENOUGH_MEMORY);
@@ -288,7 +288,7 @@ HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccel, INT cEntries)
   /* Set the end-of-table terminator. */
   accel[cEntries-1].fVirt |= 0x80;
 
-  TRACE_(accel)("Allocated accelerator handle %x\n", hAccel);
+  TRACE_(accel)("Allocated accelerator handle %p\n", hAccel);
   return hAccel;
 }
 
@@ -368,7 +368,7 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
 
     if (HIWORD(resource_id)==0xFFFF) /* netscape 3 passes this */
 	resource_id = (UINT)(-((INT)resource_id));
-    TRACE("instance = %04x, id = %04x, buffer = %08x, length = %d\n",
+    TRACE("instance = %p, id = %04x, buffer = %08x, length = %d\n",
           instance, (int)resource_id, (int) buffer, buflen);
 
     /* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
@@ -414,7 +414,7 @@ INT WINAPI LoadStringA( HINSTANCE instance, UINT resource_id,
     INT    retval;
     LPWSTR wbuf;
 
-    TRACE("instance = %04x, id = %04x, buffer = %08x, length = %d\n",
+    TRACE("instance = %p, id = %04x, buffer = %08x, length = %d\n",
           instance, (int)resource_id, (int) buffer, buflen);
 
     if(buffer == NULL) /* asked size of string */
diff --git a/dlls/user/text.c b/dlls/user/text.c
index 4ceafa9ed26..66b759a2d4a 100644
--- a/dlls/user/text.c
+++ b/dlls/user/text.c
@@ -1286,7 +1286,7 @@ LONG WINAPI TabbedTextOutA( HDC hdc, INT x, INT y, LPCSTR lpstr, INT count,
 LONG WINAPI TabbedTextOutW( HDC hdc, INT x, INT y, LPCWSTR str, INT count,
                             INT cTabStops, const INT *lpTabPos, INT nTabOrg )
 {
-    TRACE("%x %d,%d %s %d\n", hdc, x, y, debugstr_wn(str,count), count );
+    TRACE("%p %d,%d %s %d\n", hdc, x, y, debugstr_wn(str,count), count );
     return TEXT_TabbedTextOut( hdc, x, y, str, count, cTabStops, lpTabPos, nTabOrg, TRUE );
 }
 
@@ -1314,6 +1314,6 @@ DWORD WINAPI GetTabbedTextExtentA( HDC hdc, LPCSTR lpstr, INT count,
 DWORD WINAPI GetTabbedTextExtentW( HDC hdc, LPCWSTR lpstr, INT count,
                                    INT cTabStops, const INT *lpTabPos )
 {
-    TRACE("%x %s %d\n", hdc, debugstr_wn(lpstr,count), count );
+    TRACE("%p %s %d\n", hdc, debugstr_wn(lpstr,count), count );
     return TEXT_TabbedTextOut( hdc, 0, 0, lpstr, count, cTabStops, lpTabPos, 0, FALSE );
 }
diff --git a/windows/class.c b/windows/class.c
index 8e4eeb24f48..89109243e67 100644
--- a/windows/class.c
+++ b/windows/class.c
@@ -89,7 +89,7 @@ static CLASS *get_class_ptr( HWND hwnd, BOOL write_access )
                 SetLastError( ERROR_ACCESS_DENIED );
                 return NULL;
             }
-            FIXME( "reading from class of other process window %04x\n", hwnd );
+            FIXME( "reading from class of other process window %p\n", hwnd );
             /* DbgBreakPoint(); */
         }
     }
@@ -322,7 +322,7 @@ static CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE hinstance )
     CLASS * class, *tclass = 0, *user_class = 0;
     HINSTANCE16 hUser = GetModuleHandle16("USER");
 
-    TRACE("0x%08x 0x%08x\n", atom, hinstance);
+    TRACE("0x%08x %p\n", atom, hinstance);
 
     /* First search task-specific classes */
 
@@ -385,7 +385,7 @@ static CLASS *CLASS_RegisterClass( ATOM atom, HINSTANCE hInstance,
 {
     CLASS *classPtr;
 
-    TRACE("atom=0x%x hinst=0x%x style=0x%lx clExtr=0x%x winExtr=0x%x\n",
+    TRACE("atom=0x%x hinst=%p style=0x%lx clExtr=0x%x winExtr=0x%x\n",
           atom, hInstance, style, classExtra, winExtra );
 
    /* Check if a class with this name already exists */
@@ -543,13 +543,11 @@ ATOM WINAPI RegisterClass16( const WNDCLASS16 *wc )
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x "
-                 "bg=%04x style=%08x clsExt=%d winExt=%d class=%p name='%s'\n",
-                   atom, (DWORD)wc->lpfnWndProc, hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr,
-		   HIWORD(wc->lpszClassName) ?
-                       (char *)MapSL(wc->lpszClassName) : "" );
+    TRACE("atom=%04x wndproc=%08lx hinst=%p bg=%04x style=%08x clsExt=%d winExt=%d class=%p name='%s'\n",
+          atom, (DWORD)wc->lpfnWndProc, hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr,
+          HIWORD(wc->lpszClassName) ? (char *)MapSL(wc->lpszClassName) : "" );
 
     iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
@@ -590,11 +588,11 @@ ATOM WINAPI RegisterClassA( const WNDCLASSA* wc ) /* [in] Address of structure w
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x bg=%04x style=%08x clsExt=%d winExt=%d class=%p name='%s'\n",
-                   atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr,
-                   HIWORD(wc->lpszClassName) ? wc->lpszClassName : "" );
+    TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p name='%s'\n",
+          atom, wc->lpfnWndProc, wc->hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr,
+          HIWORD(wc->lpszClassName) ? wc->lpszClassName : "" );
 
     iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
@@ -631,10 +629,10 @@ ATOM WINAPI RegisterClassW( const WNDCLASSW* wc )
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x bg=%04x style=%08x clsExt=%d winExt=%d class=%p\n",
-                   atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr );
+    TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n",
+          atom, wc->lpfnWndProc, wc->hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr );
 
     iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
@@ -670,10 +668,10 @@ ATOM WINAPI RegisterClassEx16( const WNDCLASSEX16 *wc )
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x bg=%04x style=%08x clsExt=%d winExt=%d class=%p\n",
-                   atom, (DWORD)wc->lpfnWndProc, hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr );
+    TRACE("atom=%04x wndproc=%p hinst=%p bg=%04x style=%08x clsExt=%d winExt=%d class=%p\n",
+          atom, wc->lpfnWndProc, hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr );
 
     classPtr->hIcon         = HICON_32(wc->hIcon);
     classPtr->hIconSm       = HICON_32(wc->hIconSm);
@@ -704,10 +702,10 @@ ATOM WINAPI RegisterClassExA( const WNDCLASSEXA* wc )
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x bg=%04x style=%08x clsExt=%d winExt=%d class=%p\n",
-                   atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr );
+    TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n",
+          atom, wc->lpfnWndProc, wc->hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr );
 
     classPtr->hIcon         = wc->hIcon;
     classPtr->hIconSm       = wc->hIconSm;
@@ -737,10 +735,10 @@ ATOM WINAPI RegisterClassExW( const WNDCLASSEXW* wc )
         return 0;
     }
 
-    TRACE("atom=%04x wndproc=%08lx hinst=%04x bg=%04x style=%08x clsExt=%d winExt=%d class=%p\n",
-                   atom, (DWORD)wc->lpfnWndProc, wc->hInstance,
-                   wc->hbrBackground, wc->style, wc->cbClsExtra,
-                   wc->cbWndExtra, classPtr );
+    TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n",
+          atom, wc->lpfnWndProc, wc->hInstance,
+          wc->hbrBackground, wc->style, wc->cbClsExtra,
+          wc->cbWndExtra, classPtr );
 
     classPtr->hIcon         = wc->hIcon;
     classPtr->hIconSm       = wc->hIconSm;
@@ -767,7 +765,7 @@ BOOL16 WINAPI UnregisterClass16( LPCSTR className, HINSTANCE16 hInstance )
  */
 BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
 {
-    TRACE("%s %x\n",debugstr_a(className), hInstance);
+    TRACE("%s %p\n",debugstr_a(className), hInstance);
     return CLASS_UnregisterClass( GlobalFindAtomA( className ), hInstance );
 }
 
@@ -776,7 +774,7 @@ BOOL WINAPI UnregisterClassA( LPCSTR className, HINSTANCE hInstance )
  */
 BOOL WINAPI UnregisterClassW( LPCWSTR className, HINSTANCE hInstance )
 {
-    TRACE("%s %x\n",debugstr_w(className), hInstance);
+    TRACE("%s %p\n",debugstr_w(className), hInstance);
     return CLASS_UnregisterClass( GlobalFindAtomW( className ), hInstance );
 }
 
@@ -791,7 +789,7 @@ WORD WINAPI GetClassWord( HWND hwnd, INT offset )
 
     if (offset < 0) return GetClassLongA( hwnd, offset );
 
-    TRACE("%x %x\n",hwnd, offset);
+    TRACE("%p %x\n",hwnd, offset);
 
     if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
 
@@ -813,7 +811,7 @@ LONG WINAPI GetClassLong16( HWND16 hwnd16, INT16 offset )
     LONG ret;
     HWND hwnd = (HWND)(ULONG_PTR)hwnd16;  /* no need for full handle */
 
-    TRACE("%x %d\n",hwnd, offset);
+    TRACE("%p %d\n",hwnd, offset);
 
     switch( offset )
     {
@@ -841,7 +839,7 @@ LONG WINAPI GetClassLongW( HWND hwnd, INT offset )
     CLASS *class;
     LONG retvalue = 0;
 
-    TRACE("%x %d\n", hwnd, offset);
+    TRACE("%p %d\n", hwnd, offset);
 
     if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
 
@@ -910,7 +908,7 @@ LONG WINAPI GetClassLongA( HWND hwnd, INT offset )
     if (offset != GCL_WNDPROC && offset != GCL_MENUNAME)
         return GetClassLongW( hwnd, offset );
 
-    TRACE("%x %d\n", hwnd, offset);
+    TRACE("%p %d\n", hwnd, offset);
 
     if (!(class = get_class_ptr( hwnd, FALSE ))) return 0;
 
@@ -934,7 +932,7 @@ WORD WINAPI SetClassWord( HWND hwnd, INT offset, WORD newval )
 
     if (offset < 0) return SetClassLongA( hwnd, offset, (DWORD)newval );
 
-    TRACE("%x %d %x\n", hwnd, offset, newval);
+    TRACE("%p %d %x\n", hwnd, offset, newval);
 
     if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
 
@@ -960,7 +958,7 @@ LONG WINAPI SetClassLong16( HWND16 hwnd16, INT16 offset, LONG newval )
     LONG retval;
     HWND hwnd = (HWND)(ULONG_PTR)hwnd16;  /* no need for full handle */
 
-    TRACE("%x %d %lx\n", hwnd, offset, newval);
+    TRACE("%p %d %lx\n", hwnd, offset, newval);
 
     switch(offset)
     {
@@ -986,7 +984,7 @@ LONG WINAPI SetClassLongW( HWND hwnd, INT offset, LONG newval )
     CLASS *class;
     LONG retval = 0;
 
-    TRACE("%x %d %lx\n", hwnd, offset, newval);
+    TRACE("%p %d %lx\n", hwnd, offset, newval);
 
     if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
 
@@ -1064,7 +1062,7 @@ LONG WINAPI SetClassLongA( HWND hwnd, INT offset, LONG newval )
     if (offset != GCL_WNDPROC && offset != GCL_MENUNAME)
         return SetClassLongW( hwnd, offset, newval );
 
-    TRACE("%x %d %lx\n", hwnd, offset, newval);
+    TRACE("%p %d %lx\n", hwnd, offset, newval);
 
     if (!(class = get_class_ptr( hwnd, TRUE ))) return 0;
 
@@ -1087,7 +1085,7 @@ INT WINAPI GetClassNameA( HWND hwnd, LPSTR buffer, INT count )
 {
     INT ret = GlobalGetAtomNameA( GetClassLongA( hwnd, GCW_ATOM ), buffer, count );
 
-    TRACE("%x %s %x\n",hwnd, debugstr_a(buffer), count);
+    TRACE("%p %s %x\n",hwnd, debugstr_a(buffer), count);
     return ret;
 }
 
@@ -1099,7 +1097,7 @@ INT WINAPI GetClassNameW( HWND hwnd, LPWSTR buffer, INT count )
 {
     INT ret = GlobalGetAtomNameW( GetClassLongW( hwnd, GCW_ATOM ), buffer, count );
 
-    TRACE("%x %s %x\n",hwnd, debugstr_w(buffer), count);
+    TRACE("%p %s %x\n",hwnd, debugstr_w(buffer), count);
     return ret;
 }
 
@@ -1113,7 +1111,7 @@ BOOL16 WINAPI GetClassInfo16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASS16 *wc )
     CLASS *classPtr;
     HINSTANCE hInstance = HINSTANCE_32(GetExePtr( hInst16 ));
 
-    TRACE("%x %s %p\n",hInstance, debugstr_a(MapSL(name)), wc);
+    TRACE("%p %s %p\n",hInstance, debugstr_a(MapSL(name)), wc);
 
     if (!(atom = GlobalFindAtomA( MapSL(name) )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )))
@@ -1144,7 +1142,7 @@ BOOL WINAPI GetClassInfoA( HINSTANCE hInstance, LPCSTR name,
     ATOM atom;
     CLASS *classPtr;
 
-    TRACE("%x %p %p\n",hInstance, name, wc);
+    TRACE("%p %p %p\n",hInstance, name, wc);
 
     /* workaround: if hInstance=NULL you expect to get the system classes
     but this classes (as example from comctl32.dll SysListView) won't be
@@ -1185,7 +1183,7 @@ BOOL WINAPI GetClassInfoW( HINSTANCE hInstance, LPCWSTR name,
     ATOM atom;
     CLASS *classPtr;
 
-    TRACE("%x %p %p\n",hInstance, name, wc);
+    TRACE("%p %p %p\n",hInstance, name, wc);
 
     if (	!(atom=GlobalFindAtomW(name)) ||
 		!(classPtr=CLASS_FindClassByAtom(atom,hInstance))
@@ -1225,7 +1223,7 @@ BOOL16 WINAPI GetClassInfoEx16( HINSTANCE16 hInst16, SEGPTR name, WNDCLASSEX16 *
     CLASS *classPtr;
     HINSTANCE hInstance = HINSTANCE_32(GetExePtr( hInst16 ));
 
-    TRACE("%x %s %p\n",hInstance,debugstr_a( MapSL(name) ), wc);
+    TRACE("%p %s %p\n",hInstance,debugstr_a( MapSL(name) ), wc);
 
     if (!(atom = GlobalFindAtomA( MapSL(name) )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) ||
@@ -1257,7 +1255,7 @@ BOOL WINAPI GetClassInfoExA( HINSTANCE hInstance, LPCSTR name,
     ATOM atom;
     CLASS *classPtr;
 
-    TRACE("%x %p %p\n",hInstance, name, wc);
+    TRACE("%p %p %p\n",hInstance, name, wc);
 
     if (!(atom = GlobalFindAtomA( name )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance ))
@@ -1288,7 +1286,7 @@ BOOL WINAPI GetClassInfoExW( HINSTANCE hInstance, LPCWSTR name,
     ATOM atom;
     CLASS *classPtr;
 
-    TRACE("%x %p %p\n",hInstance, name, wc);
+    TRACE("%p %p %p\n",hInstance, name, wc);
 
     if (!(atom = GlobalFindAtomW( name )) ||
         !(classPtr = CLASS_FindClassByAtom( atom, hInstance )) ||
diff --git a/windows/clipboard.c b/windows/clipboard.c
index fb089303ebb..7d0510b6feb 100644
--- a/windows/clipboard.c
+++ b/windows/clipboard.c
@@ -445,8 +445,7 @@ static BOOL CLIPBOARD_RenderFormat(LPWINE_CLIPFORMAT lpFormat)
     }
     else
     {
-      WARN("\thWndClipOwner (%04x) is lost!\n",
-	   hWndClipOwner);
+      WARN("\thWndClipOwner (%p) is lost!\n", hWndClipOwner);
       CLIPBOARD_ReleaseOwner();
       lpFormat->wDataPresent = 0;
       return FALSE;
@@ -752,7 +751,7 @@ BOOL WINAPI OpenClipboard( HWND hWnd )
 {
     BOOL bRet;
 
-    TRACE("(%04x)...\n", hWnd);
+    TRACE("(%p)...\n", hWnd);
 
     if (!ClipLock)
     {
@@ -915,7 +914,7 @@ HANDLE WINAPI SetClipboardData( UINT wFormat, HANDLE hData )
 {
     LPWINE_CLIPFORMAT lpFormat = __lookup_format( ClipFormats, wFormat );
 
-    TRACE("(%08X, %08x) !\n", wFormat, hData);
+    TRACE("(%08X, %p) !\n", wFormat, hData);
 
     /* NOTE: If the hData is zero and current owner doesn't match
      * the window that opened the clipboard then this application
@@ -1099,8 +1098,7 @@ HANDLE WINAPI GetClipboardData( UINT wFormat )
       GlobalUnlock16(lpRender->hData16);
     }
 
-    TRACE("\treturning %04x (type %i)\n",
-			      lpRender->hData32, lpRender->wFormatID);
+    TRACE("\treturning %p (type %i)\n", lpRender->hData32, lpRender->wFormatID);
     return lpRender->hData32;
 }
 
@@ -1332,7 +1330,7 @@ HWND WINAPI SetClipboardViewer( HWND hWnd )
 {
     HWND hwndPrev = hWndViewer;
 
-    TRACE("(%04x): returning %04x\n", hWnd, hwndPrev);
+    TRACE("(%p): returning %p\n", hWnd, hwndPrev);
 
     hWndViewer = WIN_GetFullHandle( hWnd );
     return hwndPrev;
@@ -1356,7 +1354,7 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext)
 {
     BOOL bRet = 0;
 
-    FIXME("(0x%04x, 0x%04x): stub?\n", hWnd, hWndNext);
+    FIXME("(%p, %p): stub?\n", hWnd, hWndNext);
 
     if( hWndViewer )
         bRet = !SendMessageW( hWndViewer, WM_CHANGECBCHAIN, (WPARAM)hWnd, (LPARAM)hWndNext );
diff --git a/windows/cursoricon.c b/windows/cursoricon.c
index 77c0a397df5..e6e94c67e28 100644
--- a/windows/cursoricon.c
+++ b/windows/cursoricon.c
@@ -861,8 +861,8 @@ static HICON CURSORICON_ExtCopy(HICON hIcon, UINT nType,
 {
     HICON hNew=0;
 
-    TRACE_(icon)("hIcon %u, nType %u, iDesiredCX %i, iDesiredCY %i, nFlags %u\n",
-        hIcon, nType, iDesiredCX, iDesiredCY, nFlags);
+    TRACE_(icon)("hIcon %p, nType %u, iDesiredCX %i, iDesiredCY %i, nFlags %u\n",
+                 hIcon, nType, iDesiredCX, iDesiredCY, nFlags);
 
     if(hIcon == 0)
     {
@@ -1167,7 +1167,7 @@ HICON16 WINAPI CopyIcon16( HINSTANCE16 hInstance, HICON16 hIcon )
  */
 HICON WINAPI CopyIcon( HICON hIcon )
 {
-    TRACE_(icon)("%04x\n", hIcon );
+    TRACE_(icon)("%p\n", hIcon );
     return CURSORICON_Copy( 0, hIcon );
 }
 
@@ -1306,7 +1306,7 @@ HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ )
     HCURSOR hOldCursor;
 
     if (hCursor == queue->cursor) return hCursor;  /* No change */
-    TRACE_(cursor)("%04x\n", hCursor );
+    TRACE_(cursor)("%p\n", hCursor );
     hOldCursor = queue->cursor;
     queue->cursor = hCursor;
     /* Change the cursor shape only if it is visible */
@@ -1728,9 +1728,8 @@ BOOL WINAPI DrawIconEx( HDC hdc, INT x0, INT y0, HICON hIcon,
     HBITMAP hB_off = 0, hOld = 0;
 
     if (!ptr) return FALSE;
-    TRACE_(icon)("(hdc=%x,pos=%d.%d,hicon=%x,extend=%d.%d,istep=%d,br=%x,flags=0x%08x)\n",
-	    hdc,x0,y0,hIcon,cxWidth,cyWidth,istep,hbr,flags
-    );
+    TRACE_(icon)("(hdc=%p,pos=%d.%d,hicon=%p,extend=%d.%d,istep=%d,br=%p,flags=0x%08x)\n",
+                 hdc,x0,y0,hIcon,cxWidth,cyWidth,istep,hbr,flags );
 
     hMemDC = CreateCompatibleDC (hdc);
     if (istep)
@@ -2029,10 +2028,10 @@ HANDLE WINAPI LoadImageW( HINSTANCE hinst, LPCWSTR name, UINT type,
                 INT desiredx, INT desiredy, UINT loadflags )
 {
     if (HIWORD(name)) {
-        TRACE_(resource)("(0x%04x,%p,%d,%d,%d,0x%08x)\n",
+        TRACE_(resource)("(%p,%p,%d,%d,%d,0x%08x)\n",
 	      hinst,name,type,desiredx,desiredy,loadflags);
     } else {
-        TRACE_(resource)("(0x%04x,%p,%d,%d,%d,0x%08x)\n",
+        TRACE_(resource)("(%p,%p,%d,%d,%d,0x%08x)\n",
 	      hinst,name,type,desiredx,desiredy,loadflags);
     }
     if (loadflags & LR_DEFAULTSIZE) {
diff --git a/windows/dce.c b/windows/dce.c
index f745a8a2271..46909cdb8c9 100644
--- a/windows/dce.c
+++ b/windows/dce.c
@@ -65,7 +65,7 @@ static void DCE_DumpCache(void)
     DPRINTF("DCE:\n");
     while( dce )
     {
-	DPRINTF("\t[0x%08x] hWnd 0x%04x, dcx %08x, %s %s\n",
+	DPRINTF("\t[0x%08x] hWnd %p, dcx %08x, %s %s\n",
 	     (unsigned)dce, dce->hwndCurrent, (unsigned)dce->DCXflags,
 	     (dce->DCXflags & DCX_CACHE) ? "Cache" : "Owned",
 	     (dce->DCXflags & DCX_DCEBUSY) ? "InUse" : "" );
@@ -190,7 +190,7 @@ void DCE_FreeWindowDCE( HWND hwnd )
                      * We should change this to WARN when Wine is more stable
                      * (for 1.0?).
                      */
-		    ERR("[%08x] GetDC() without ReleaseDC()!\n",hwnd);
+		    ERR("[%p] GetDC() without ReleaseDC()!\n",hwnd);
 		    DCE_ReleaseDC( pDCE );
 		}
 
@@ -280,9 +280,9 @@ BOOL DCE_InvalidateDCE(HWND hwnd, const RECT* pRectUpdate)
     {
 	DCE *dce;
 
-	TRACE("scope hwnd = %04x, (%i,%i - %i,%i)\n",
-		     hwndScope, pRectUpdate->left,pRectUpdate->top,
-		     pRectUpdate->right,pRectUpdate->bottom);
+        TRACE("scope hwnd = %p, (%i,%i - %i,%i)\n",
+              hwndScope, pRectUpdate->left,pRectUpdate->top,
+              pRectUpdate->right,pRectUpdate->bottom);
 	if(TRACE_ON(dc))
 	  DCE_DumpCache();
 
@@ -311,7 +311,7 @@ BOOL DCE_InvalidateDCE(HWND hwnd, const RECT* pRectUpdate)
                 {
                     /* Don't bother with visible regions of unused DCEs */
 
-                    TRACE("\tpurged %p dce [%04x]\n", dce, dce->hwndCurrent);
+                    TRACE("\tpurged %p dce [%p]\n", dce, dce->hwndCurrent);
                     if (dce->hwndCurrent && USER_Driver.pReleaseDC)
                         USER_Driver.pReleaseDC( dce->hwndCurrent, dce->hDC );
                     dce->hwndCurrent = 0;
@@ -322,7 +322,7 @@ BOOL DCE_InvalidateDCE(HWND hwnd, const RECT* pRectUpdate)
                 {
                     /* Set dirty bits in the hDC and DCE structs */
 
-                    TRACE("\tfixed up %p dce [%04x]\n", dce, dce->hwndCurrent);
+                    TRACE("\tfixed up %p dce [%p]\n", dce, dce->hwndCurrent);
                     dce->DCXflags |= DCX_DCEDIRTY;
                     SetHookFlags16( HDC_16(dce->hDC), DCHF_INVALIDATEVISRGN );
                     bRet = TRUE;
@@ -379,13 +379,12 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
     BOOL	bUpdateClipOrigin = FALSE;
     HWND parent, full;
 
-    TRACE("hwnd %04x, hrgnClip %04x, flags %08x\n",
-          hwnd, hrgnClip, (unsigned)flags);
+    TRACE("hwnd %p, hrgnClip %p, flags %08lx\n", hwnd, hrgnClip, flags);
 
     if (!hwnd) hwnd = GetDesktopWindow();
     if (!(full = WIN_IsCurrentProcess( hwnd )))
     {
-        FIXME( "not supported yet on other process window %x\n", hwnd );
+        FIXME( "not supported yet on other process window %p\n", hwnd );
         return 0;
     }
     hwnd = full;
@@ -461,8 +460,8 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
 		   ((dce->DCXflags & (DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN |
 				      DCX_CACHE | DCX_WINDOW | DCX_PARENTCLIP)) == dcxFlags))
 		{
-		    TRACE("\tfound valid %08x dce [%04x], flags %08x\n",
-					(unsigned)dce, hwnd, (unsigned)dcxFlags );
+		    TRACE("\tfound valid %p dce [%p], flags %08lx\n",
+                          dce, hwnd, dcxFlags );
 		    bUpdateVisRgn = FALSE;
 		    bUpdateClipOrigin = TRUE;
 		    break;
@@ -515,7 +514,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
 
     if (!USER_Driver.pGetDC( hwnd, hdc, hrgnClip, flags )) hdc = 0;
 
-    TRACE("(%04x,%04x,0x%lx): returning %04x\n", hwnd, hrgnClip, flags, hdc);
+    TRACE("(%p,%p,0x%lx): returning %p\n", hwnd, hrgnClip, flags, hdc);
 END:
     WIN_ReleasePtr(wndPtr);
     return hdc;
@@ -563,7 +562,7 @@ INT WINAPI ReleaseDC(
     USER_Lock();
     dce = firstDCE;
 
-    TRACE("%04x %04x\n", hwnd, hdc );
+    TRACE("%p %p\n", hwnd, hdc );
 
     while (dce && (dce->hDC != hdc)) dce = dce->next;
 
@@ -662,7 +661,7 @@ BOOL WINAPI LockWindowUpdate( HWND hwnd )
 {
     static HWND lockedWnd;
 
-    FIXME("(%x), partial stub!\n",hwnd);
+    FIXME("(%p), partial stub!\n",hwnd);
 
     USER_Lock();
     if (lockedWnd)
diff --git a/windows/defdlg.c b/windows/defdlg.c
index e1a7865865b..cae79f933fd 100644
--- a/windows/defdlg.c
+++ b/windows/defdlg.c
@@ -41,7 +41,7 @@ static WNDPROC DEFDLG_GetDlgProc( HWND hwnd )
     if (!wndPtr) return 0;
     if (wndPtr == WND_OTHER_PROCESS)
     {
-        ERR( "cannot get dlg proc %x from other process\n", hwnd );
+        ERR( "cannot get dlg proc %p from other process\n", hwnd );
         return 0;
     }
     ret = *(WNDPROC *)((char *)wndPtr->wExtra + DWL_DLGPROC);
diff --git a/windows/defwnd.c b/windows/defwnd.c
index aecd5cd2c8f..95dcc23ccf6 100644
--- a/windows/defwnd.c
+++ b/windows/defwnd.c
@@ -196,7 +196,7 @@ static void DEFWND_SetRedraw( HWND hwnd, WPARAM wParam )
     WND *wndPtr = WIN_FindWndPtr( hwnd );
     BOOL bVisible = wndPtr->dwStyle & WS_VISIBLE;
 
-    TRACE("%04x %i\n", hwnd, (wParam!=0) );
+    TRACE("%p %i\n", hwnd, (wParam!=0) );
 
     if( wParam )
     {
@@ -684,7 +684,7 @@ LRESULT WINAPI DefWindowProc16( HWND16 hwnd16, UINT16 msg, WPARAM16 wParam,
     if (!WIN_IsCurrentProcess( hwnd ))
     {
         if (!IsWindow( hwnd )) return 0;
-        ERR( "called for other process window %x\n", hwnd );
+        ERR( "called for other process window %p\n", hwnd );
         return 0;
     }
     SPY_EnterMessage( SPY_DEFWNDPROC16, hwnd, msg, wParam, lParam );
@@ -749,7 +749,7 @@ LRESULT WINAPI DefWindowProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
     if (!(full_handle = WIN_IsCurrentProcess( hwnd )))
     {
         if (!IsWindow( hwnd )) return 0;
-        ERR( "called for other process window %x\n", hwnd );
+        ERR( "called for other process window %p\n", hwnd );
         return 0;
     }
     hwnd = full_handle;
@@ -890,7 +890,7 @@ LRESULT WINAPI DefWindowProcW(
     if (!(full_handle = WIN_IsCurrentProcess( hwnd )))
     {
         if (!IsWindow( hwnd )) return 0;
-        ERR( "called for other process window %x\n", hwnd );
+        ERR( "called for other process window %p\n", hwnd );
         return 0;
     }
     hwnd = full_handle;
diff --git a/windows/dialog.c b/windows/dialog.c
index 4315226d6aa..13e4806c57e 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -1226,8 +1226,8 @@ INT_PTR WINAPI DialogBoxIndirectParamAorW(HINSTANCE hInstance, LPCVOID template,
                                        LPARAM param, DWORD x )
 {
     HWND hwnd;
-    FIXME("0x%08x %p 0x%08x %p 0x%08lx 0x%08lx\n",
-      hInstance, template, owner, dlgProc, param, x);
+    FIXME("%p %p %p %p 0x%08lx 0x%08lx\n",
+          hInstance, template, owner, dlgProc, param, x);
     hwnd = DIALOG_CreateIndirect( hInstance, template, owner, dlgProc, param, WIN_PROC_32W, TRUE );
     if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
     return -1;
@@ -1242,11 +1242,11 @@ BOOL WINAPI EndDialog( HWND hwnd, INT_PTR retval )
     DIALOGINFO * dlgInfo;
     HWND owner;
 
-    TRACE("%04x %d\n", hwnd, retval );
+    TRACE("%p %d\n", hwnd, retval );
 
     if (!(dlgInfo = DIALOG_get_info( hwnd )))
     {
-        ERR("got invalid window handle (%04x); buggy app !?\n", hwnd);
+        ERR("got invalid window handle (%p); buggy app !?\n", hwnd);
         return FALSE;
     }
     dlgInfo->idResult = retval;
@@ -1858,7 +1858,7 @@ static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
     BOOL ret;
     HWND listbox = GetDlgItem( hwnd, id );
 
-    TRACE("%04x '%s' %d\n", hwnd, str, id );
+    TRACE("%p '%s' %d\n", hwnd, str, id );
     if (!listbox) return FALSE;
 
     item = SendMessageA(listbox, combo ? CB_GETCURSEL : LB_GETCURSEL, 0, 0 );
@@ -1913,8 +1913,8 @@ static INT DIALOG_DlgDirList( HWND hDlg, LPSTR spec, INT idLBox,
     ((attrib & DDL_POSTMSGS) ? PostMessageA( hwnd, msg, wparam, lparam ) \
                              : SendMessageA( hwnd, msg, wparam, lparam ))
 
-    TRACE("%04x '%s' %d %d %04x\n",
-                    hDlg, spec ? spec : "NULL", idLBox, idStatic, attrib );
+    TRACE("%p '%s' %d %d %04x\n",
+          hDlg, spec ? spec : "NULL", idLBox, idStatic, attrib );
 
     /* If the path exists and is a directory, chdir to it */
     if (!spec || !spec[0] || SetCurrentDirectoryA( spec )) spec = "*.*";
diff --git a/windows/input.c b/windows/input.c
index e6c7a44387f..79ec4af7924 100644
--- a/windows/input.c
+++ b/windows/input.c
@@ -753,7 +753,7 @@ HKL WINAPI GetKeyboardLayout(DWORD dwLayout)
  */
 INT WINAPI GetKeyboardLayoutNameA(LPSTR pwszKLID)
 {
-        sprintf(pwszKLID, "%08x",GetKeyboardLayout(0));
+        sprintf(pwszKLID, "%p",GetKeyboardLayout(0));
         return 1;
 }
 
@@ -844,7 +844,7 @@ INT WINAPI ToAsciiEx( UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
  */
 HKL WINAPI ActivateKeyboardLayout(HKL hLayout, UINT flags)
 {
-    TRACE_(keyboard)("(%d, %d)\n", hLayout, flags);
+    TRACE_(keyboard)("(%p, %d)\n", hLayout, flags);
     ERR_(keyboard)("Only default system keyboard layout supported. Call ignored.\n");
     return 0;
 }
@@ -875,7 +875,7 @@ INT WINAPI GetKeyboardLayoutList(INT nBuff,HKL *layouts)
  *		RegisterHotKey (USER32.@)
  */
 BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) {
-	FIXME_(keyboard)("(0x%08x,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
+	FIXME_(keyboard)("(%p,%d,0x%08x,%d): stub\n",hwnd,id,modifiers,vk);
 	return TRUE;
 }
 
@@ -883,7 +883,7 @@ BOOL WINAPI RegisterHotKey(HWND hwnd,INT id,UINT modifiers,UINT vk) {
  *		UnregisterHotKey (USER32.@)
  */
 BOOL WINAPI UnregisterHotKey(HWND hwnd,INT id) {
-	FIXME_(keyboard)("(0x%08x,%d): stub\n",hwnd,id);
+	FIXME_(keyboard)("(%p,%d): stub\n",hwnd,id);
 	return TRUE;
 }
 
@@ -1030,7 +1030,7 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
     pos.x = 0;
     pos.y = 0;
 
-    TRACE("%lx, %lx, %x, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime);
+    TRACE("%lx, %lx, %p, %lx\n", ptme->cbSize, ptme->dwFlags, ptme->hwndTrack, ptme->dwHoverTime);
 
     if (ptme->cbSize != sizeof(TRACKMOUSEEVENT)) {
         WARN("wrong TRACKMOUSEEVENT size from app\n");
diff --git a/windows/mdi.c b/windows/mdi.c
index d8b260eacf4..da5d96f0e49 100644
--- a/windows/mdi.c
+++ b/windows/mdi.c
@@ -198,10 +198,10 @@ static MDICLIENTINFO *get_client_info( HWND client )
     {
         if (win == WND_OTHER_PROCESS)
         {
-            ERR( "client %x belongs to other process\n", client );
+            ERR( "client %p belongs to other process\n", client );
             return NULL;
         }
-        if (win->cbWndExtra < sizeof(MDICLIENTINFO)) WARN( "%x is not an MDI client\n", client );
+        if (win->cbWndExtra < sizeof(MDICLIENTINFO)) WARN( "%p is not an MDI client\n", client );
         else ret = (MDICLIENTINFO *)win->wExtra;
         WIN_ReleasePtr( win );
     }
@@ -358,8 +358,7 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
     HWND hwndFrame = GetParent(hwnd);
     HMENU oldFrameMenu = GetMenu(hwndFrame);
 
-    TRACE("%04x %04x %04x\n",
-                hwnd, hmenuFrame, hmenuWindow);
+    TRACE("%p %p %p\n", hwnd, hmenuFrame, hmenuWindow);
 
     if (hmenuFrame && !IsMenu(hmenuFrame))
     {
@@ -472,8 +471,7 @@ static LRESULT MDIRefreshMenu( HWND hwnd, HMENU hmenuFrame,
     HWND hwndFrame = GetParent(hwnd);
     HMENU oldFrameMenu = GetMenu(hwndFrame);
 
-    TRACE("%04x %04x %04x\n",
-                hwnd, hmenuFrame, hmenuWindow);
+    TRACE("%p %p %p\n", hwnd, hmenuFrame, hmenuWindow);
 
     FIXME("partially function stub\n");
 
@@ -514,7 +512,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
     /* restore current maximized child */
     if( (style & WS_VISIBLE) && ci->hwndChildMaximized )
     {
-	TRACE("Restoring current maximized child %04x\n", ci->hwndChildMaximized);
+	TRACE("Restoring current maximized child %p\n", ci->hwndChildMaximized);
 	if( style & WS_MAXIMIZE )
 	    SendMessageW(parent, WM_SETREDRAW, FALSE, 0L);
 	hwndMax = ci->hwndChildMaximized;
@@ -607,7 +605,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
 
         if( IsIconic(hwnd) && ci->hwndActiveChild )
 	{
-	    TRACE("Minimizing created MDI child %04x\n", hwnd);
+	    TRACE("Minimizing created MDI child %p\n", hwnd);
 	    ShowWindow( hwnd, SW_SHOWMINNOACTIVE );
 	}
 	else
@@ -619,7 +617,7 @@ static HWND MDICreateChild( HWND parent, MDICLIENTINFO *ci,
              */
             if (IsWindowVisible(hwnd)) ShowWindow(hwnd, SW_SHOW);
 	}
-        TRACE("created child - %04x\n",hwnd);
+        TRACE("created child - %p\n",hwnd);
     }
     else
     {
@@ -671,7 +669,7 @@ static void MDI_SwitchActiveChild( HWND clientHwnd, HWND childHwnd,
 
     hwndTo = MDI_GetWindow(ci, childHwnd, bNextWindow, 0);
 
-    TRACE("from %04x, to %04x\n",childHwnd,hwndTo);
+    TRACE("from %p, to %p\n",childHwnd,hwndTo);
 
     if ( !hwndTo ) return; /* no window to switch to */
 
@@ -718,7 +716,7 @@ static LRESULT MDIDestroyChild( HWND parent, MDICLIENTINFO *ci,
 
     ci->nActiveChildren--;
 
-    TRACE("child destroyed - %04x\n",child);
+    TRACE("child destroyed - %p\n",child);
 
     if (flagDestroy)
     {
@@ -746,7 +744,7 @@ static LONG MDI_ChildActivate( HWND client, HWND child )
        since ShowWindow DOES activate MDI children */
     if (clientInfo->hwndActiveChild == child) return 0;
 
-    TRACE("%04x\n", child);
+    TRACE("%p\n", child);
 
     isActiveFrameWnd = (GetActiveWindow() == GetParent(client));
 
@@ -897,7 +895,7 @@ static LONG MDICascade( HWND client, MDICLIENTINFO *ci )
         /* walk the list (backwards) and move windows */
         for (i = total - 1; i >= 0; i--)
         {
-            TRACE("move %04x to (%ld,%ld) size [%ld,%ld]\n",
+            TRACE("move %p to (%ld,%ld) size [%ld,%ld]\n",
                   win_array[i], pos[0].x, pos[0].y, pos[1].x, pos[1].y);
 
             MDI_CalcDefaultChildPos(client, n++, pos, delta);
@@ -1007,7 +1005,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
     HMENU  	hSysPopup = 0;
   HBITMAP hSysMenuBitmap = 0;
 
-    TRACE("frame %04x,child %04x\n",frame,hChild);
+    TRACE("frame %p,child %p\n",frame,hChild);
 
     if( !menu || !child->hSysMenu )
     {
@@ -1098,7 +1096,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild )
     INT nItems = GetMenuItemCount(menu) - 1;
     UINT iId = GetMenuItemID(menu,nItems) ;
 
-    TRACE("frame %04x,child %04x,nIt=%d,iId=%d\n",frame,hChild,nItems,iId);
+    TRACE("frame %p,child %p,nIt=%d,iId=%d\n",frame,hChild,nItems,iId);
 
     if(!(iId == SC_RESTORE || iId == SC_CLOSE) )
 	return 0;
@@ -1267,8 +1265,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
 
         MDI_UpdateFrameText( GetParent(hwnd), hwnd, MDI_NOFRAMEREPAINT, NULL);
 
-	TRACE("Client created - hwnd = %04x, idFirst = %u\n",
-              hwnd, ci->idFirstChild );
+        TRACE("Client created - hwnd = %p, idFirst = %u\n", hwnd, ci->idFirstChild );
         return 0;
       }
 
@@ -1367,7 +1364,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
             pt.y = SHIWORD(lParam);
             child = ChildWindowFromPoint(hwnd, pt);
 
-	    TRACE("notification from %04x (%li,%li)\n",child,pt.x,pt.y);
+	    TRACE("notification from %p (%li,%li)\n",child,pt.x,pt.y);
 
             if( child && child != hwnd && child != ci->hwndActiveChild )
                 SetWindowPos(child, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
@@ -1751,7 +1748,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
                 ShowWindow( hMaxChild, SW_SHOWNOACTIVATE );
                 SendMessageW( hMaxChild, WM_SETREDRAW, TRUE, 0 );
             }
-            TRACE("maximizing child %04x\n", hwnd );
+            TRACE("maximizing child %p\n", hwnd );
 
             /* keep track of the maximized window. */
             ci->hwndChildMaximized = hwnd; /* !!! */
@@ -1823,13 +1820,13 @@ HWND WINAPI CreateMDIWindowA(
     MDICLIENTINFO *pCi = get_client_info( hWndParent );
     MDICREATESTRUCTA cs;
 
-    TRACE("(%s,%s,%ld,%d,%d,%d,%d,%x,%d,%ld)\n",
+    TRACE("(%s,%s,%ld,%d,%d,%d,%d,%p,%p,%ld)\n",
           debugstr_a(lpClassName),debugstr_a(lpWindowName),dwStyle,X,Y,
           nWidth,nHeight,hWndParent,hInstance,lParam);
 
     if (!pCi)
     {
-        ERR("bad hwnd for MDI-client: %04x\n", hWndParent);
+        ERR("bad hwnd for MDI-client: %p\n", hWndParent);
         return 0;
     }
     cs.szClass=lpClassName;
@@ -1867,13 +1864,13 @@ HWND WINAPI CreateMDIWindowW(
     MDICLIENTINFO *pCi = get_client_info( hWndParent );
     MDICREATESTRUCTW cs;
 
-    TRACE("(%s,%s,%ld,%d,%d,%d,%d,%x,%d,%ld)\n",
+    TRACE("(%s,%s,%ld,%d,%d,%d,%d,%p,%p,%ld)\n",
           debugstr_w(lpClassName), debugstr_w(lpWindowName), dwStyle, X, Y,
           nWidth, nHeight, hWndParent, hInstance, lParam);
 
     if (!pCi)
     {
-        ERR("bad hwnd for MDI-client: %04x\n", hWndParent);
+        ERR("bad hwnd for MDI-client: %p\n", hWndParent);
         return 0;
     }
     cs.szClass = lpClassName;
@@ -2077,9 +2074,7 @@ WORD WINAPI
 CascadeWindows (HWND hwndParent, UINT wFlags, const LPRECT lpRect,
 		UINT cKids, const HWND *lpKids)
 {
-    FIXME("(0x%08x,0x%08x,...,%u,...): stub\n",
-	   hwndParent, wFlags, cKids);
-
+    FIXME("(%p,0x%08x,...,%u,...): stub\n", hwndParent, wFlags, cKids);
     return 0;
 }
 
@@ -2095,9 +2090,7 @@ WORD WINAPI
 TileWindows (HWND hwndParent, UINT wFlags, const LPRECT lpRect,
 	     UINT cKids, const HWND *lpKids)
 {
-    FIXME("(0x%08x,0x%08x,...,%u,...): stub\n",
-	   hwndParent, wFlags, cKids);
-
+    FIXME("(%p,0x%08x,...,%u,...): stub\n", hwndParent, wFlags, cKids);
     return 0;
 }
 
diff --git a/windows/message.c b/windows/message.c
index 581eed2e8e9..5af799b51d8 100644
--- a/windows/message.c
+++ b/windows/message.c
@@ -793,7 +793,7 @@ DWORD WINAPI WaitForInputIdle( HANDLE hProcess, DWORD dwTimeOut )
     start_time = GetTickCount();
     elapsed = 0;
 
-    TRACE("waiting for %x\n", idle_event );
+    TRACE("waiting for %p\n", idle_event );
     do
     {
         ret = MsgWaitForMultipleObjects ( 1, &idle_event, FALSE, dwTimeOut - elapsed, QS_SENDMESSAGE );
@@ -1077,7 +1077,7 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
     if (wndPtr == WND_OTHER_PROCESS)
     {
         if (IsWindow( msg->hwnd ))
-            ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd );
+            ERR( "cannot dispatch msg to other process window %p\n", msg->hwnd );
         SetLastError( ERROR_INVALID_WINDOW_HANDLE );
         return 0;
     }
@@ -1105,7 +1105,7 @@ LONG WINAPI DispatchMessageA( const MSG* msg )
         WIN_ReleasePtr( wndPtr );
         if (validate)
         {
-            ERR( "BeginPaint not called on WM_PAINT for hwnd %04x!\n", msg->hwnd );
+            ERR( "BeginPaint not called on WM_PAINT for hwnd %p!\n", msg->hwnd );
             /* Validate the update region to avoid infinite WM_PAINT loop */
             RedrawWindow( msg->hwnd, NULL, 0,
                           RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
@@ -1169,7 +1169,7 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
     if (wndPtr == WND_OTHER_PROCESS)
     {
         if (IsWindow( msg->hwnd ))
-            ERR( "cannot dispatch msg to other process window %x\n", msg->hwnd );
+            ERR( "cannot dispatch msg to other process window %p\n", msg->hwnd );
         SetLastError( ERROR_INVALID_WINDOW_HANDLE );
         return 0;
     }
@@ -1197,7 +1197,7 @@ LONG WINAPI DispatchMessageW( const MSG* msg )
         WIN_ReleasePtr( wndPtr );
         if (validate)
         {
-            ERR( "BeginPaint not called on WM_PAINT for hwnd %04x!\n", msg->hwnd );
+            ERR( "BeginPaint not called on WM_PAINT for hwnd %p!\n", msg->hwnd );
             /* Validate the update region to avoid infinite WM_PAINT loop */
             RedrawWindow( msg->hwnd, NULL, 0,
                           RDW_NOFRAME | RDW_VALIDATE | RDW_NOCHILDREN | RDW_NOINTERNALPAINT );
diff --git a/windows/nonclient.c b/windows/nonclient.c
index 62d4b7abe18..49f3995b33d 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -296,7 +296,7 @@ BOOL WINAPI DrawCaptionTempW (HWND hwnd, HDC hdc, const RECT *rect, HFONT hFont,
 {
     RECT   rc = *rect;
 
-    TRACE("(%08x,%08x,%p,%08x,%08x,%s,%08x)\n",
+    TRACE("(%p,%p,%p,%p,%p,%s,%08x)\n",
           hwnd, hdc, rect, hFont, hIcon, debugstr_w(str), uFlags);
 
     /* drawing background */
@@ -469,10 +469,8 @@ LONG NC_HandleNCCalcSize( HWND hwnd, RECT *winRect )
 
         if (!(style & WS_CHILD) && GetMenu(hwnd))
         {
-	    TRACE("Calling GetMenuBarHeight with HWND 0x%x, width %d, "
-                  "at (%d, %d).\n", hwnd,
-                  winRect->right - winRect->left,
-                  -tmpRect.left, -tmpRect.top );
+            TRACE("Calling GetMenuBarHeight with hwnd %p, width %d, at (%d, %d).\n",
+                  hwnd, winRect->right - winRect->left, -tmpRect.left, -tmpRect.top );
 
 	    winRect->top +=
 		MENU_GetMenuBarHeight( hwnd,
@@ -563,7 +561,7 @@ static LONG NC_DoNCHitTest (WND *wndPtr, POINT pt )
 {
     RECT rect;
 
-    TRACE("hwnd=%04x pt=%ld,%ld\n", wndPtr->hwndSelf, pt.x, pt.y );
+    TRACE("hwnd=%p pt=%ld,%ld\n", wndPtr->hwndSelf, pt.x, pt.y );
 
     GetWindowRect(wndPtr->hwndSelf, &rect );
     if (!PtInRect( &rect, pt )) return HTNOWHERE;
@@ -695,7 +693,7 @@ static LONG NC_DoNCHitTest95 (WND *wndPtr, POINT pt )
 {
     RECT rect;
 
-    TRACE("hwnd=%04x pt=%ld,%ld\n", wndPtr->hwndSelf, pt.x, pt.y );
+    TRACE("hwnd=%p pt=%ld,%ld\n", wndPtr->hwndSelf, pt.x, pt.y );
 
     GetWindowRect(wndPtr->hwndSelf, &rect );
     if (!PtInRect( &rect, pt )) return HTNOWHERE;
@@ -1408,7 +1406,7 @@ static void NC_DoNCPaint( HWND hwnd, HRGN clip, BOOL suppress_menupaint )
 
     active  = flags & WIN_NCACTIVATED;
 
-    TRACE("%04x %d\n", hwnd, active );
+    TRACE("%p %d\n", hwnd, active );
 
     if (!(hdc = GetDCEx( hwnd, (clip > (HRGN)1) ? clip : 0, DCX_USESTYLE | DCX_WINDOW |
 			      ((clip > (HRGN)1) ? (DCX_INTERSECTRGN | DCX_KEEPCLIPRGN): 0) ))) return;
@@ -1533,7 +1531,7 @@ static void  NC_DoNCPaint95(
 
     active  = flags & WIN_NCACTIVATED;
 
-    TRACE("%04x %d\n", hwnd, active );
+    TRACE("%p %d\n", hwnd, active );
 
     /* MSDN docs are pretty idiotic here, they say app CAN use clipRgn in
        the call to GetDCEx implying that it is allowed not to use it either.
diff --git a/windows/painting.c b/windows/painting.c
index f991729e9af..e20f796887b 100644
--- a/windows/painting.c
+++ b/windows/painting.c
@@ -205,7 +205,7 @@ static HRGN WIN_UpdateNCRgn(WND* wnd, HRGN hRgn, UINT uncFlags )
     HRGN  hClip = 0;
     HRGN  hrgnRet = 0;
 
-    TRACE_(nonclient)("hwnd %04x [%04x] hrgn %04x, unc %04x, ncf %i\n",
+    TRACE_(nonclient)("hwnd %p [%p] hrgn %p, unc %04x, ncf %i\n",
                       wnd->hwndSelf, wnd->hrgnUpdate, hRgn, uncFlags, wnd->flags & WIN_NEEDS_NCPAINT);
 
     /* desktop window doesn't have a nonclient area */
@@ -243,7 +243,7 @@ static HRGN WIN_UpdateNCRgn(WND* wnd, HRGN hRgn, UINT uncFlags )
 	    wnd->flags &= ~WIN_NEEDS_NCPAINT;
 	    GETCLIENTRECTW( wnd, r );
 
-	    TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %04x\n",
+	    TRACE_(nonclient)( "\tclient box (%i,%i-%i,%i), hrgnUpdate %p\n",
 				r.left, r.top, r.right, r.bottom, wnd->hrgnUpdate );
 	    if( wnd->hrgnUpdate > (HRGN)1 )
 	    {
@@ -337,7 +337,7 @@ copyrgn:
         }
     }
 
-    TRACE_(nonclient)("returning %04x (hClip = %04x, hrgnUpdate = %04x)\n", hrgnRet, hClip, wnd->hrgnUpdate );
+    TRACE_(nonclient)("returning %p (hClip = %p, hrgnUpdate = %p)\n", hrgnRet, hClip, wnd->hrgnUpdate );
 
     return hrgnRet;
 }
@@ -427,7 +427,7 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs
     r.right = wndPtr->rectWindow.right - wndPtr->rectWindow.left;
     r.bottom = wndPtr->rectWindow.bottom - wndPtr->rectWindow.top;
 
-    TRACE("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", wndPtr->hwndSelf, wndPtr->hrgnUpdate, hRgn, flags );
+    TRACE("\thwnd %p [%p] -> hrgn [%p], flags [%04x]\n", wndPtr->hwndSelf, wndPtr->hrgnUpdate, hRgn, flags );
 
     if( flags & RDW_INVALIDATE )
     {
@@ -630,7 +630,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
 
       /* Erase/update the window itself ... */
 
-    TRACE("\thwnd %04x [%04x] -> hrgn [%04x], flags [%04x]\n", hWnd, wndPtr->hrgnUpdate, hrgn, flags );
+    TRACE("\thwnd %p [%p] -> hrgn [%p], flags [%04x]\n", hWnd, wndPtr->hrgnUpdate, hrgn, flags );
 
     /*
      * Check if this window should delay it's processing of WM_NCPAINT.
@@ -731,7 +731,7 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rectUpdate,
 	if( hrgnUpdate )
 	{
 	    GetRgnBox( hrgnUpdate, &r );
-            TRACE( "%04x (%04x) NULL %04x box (%i,%i-%i,%i) flags=%04x\n",
+            TRACE( "%p (%p) NULL %p box (%i,%i-%i,%i) flags=%04x\n",
 	          hwnd, wndPtr->hrgnUpdate, hrgnUpdate, r.left, r.top, r.right, r.bottom, flags );
 	}
 	else
@@ -740,9 +740,9 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rectUpdate,
 		r = *rectUpdate;
 	    else
 		SetRectEmpty( &r );
-	    TRACE( "%04x (%04x) %s %d,%d-%d,%d %04x flags=%04x\n",
-			hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left,
-			r.top, r.right, r.bottom, hrgnUpdate, flags );
+	    TRACE( "%p (%p) %s %d,%d-%d,%d %p flags=%04x\n",
+                   hwnd, wndPtr->hrgnUpdate, rectUpdate ? "rect" : "NULL", r.left,
+                   r.top, r.right, r.bottom, hrgnUpdate, flags );
 	}
     }
 
@@ -1157,7 +1157,7 @@ BOOL WINAPI DrawAnimatedRects( HWND hwnd, INT idAni,
                                    const RECT* lprcFrom,
                                    const RECT* lprcTo )
 {
-    FIXME_(win)("(0x%x,%d,%p,%p): stub\n",hwnd,idAni,lprcFrom,lprcTo);
+    FIXME_(win)("(%p,%d,%p,%p): stub\n",hwnd,idAni,lprcFrom,lprcTo);
     return TRUE;
 }
 
diff --git a/windows/spy.c b/windows/spy.c
index 881b3e10104..0e120652931 100644
--- a/windows/spy.c
+++ b/windows/spy.c
@@ -2149,7 +2149,7 @@ void SPY_DumpStructure (SPY_INSTANCE *sp_e, BOOL enter)
 		      lpdis->CtlType, lpdis->CtlID);
 		TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
 		      lpdis->itemID, lpdis->itemAction, lpdis->itemState);
-		TRACE("hWnd=0x%04x hDC=0x%04x (%d,%d)-(%d,%d) itemData=0x%08lx\n",
+		TRACE("hWnd=%p hDC=%p (%d,%d)-(%d,%d) itemData=0x%08lx\n",
 		      lpdis->hwndItem, lpdis->hDC, lpdis->rcItem.left,
 		      lpdis->rcItem.top, lpdis->rcItem.right,
 		      lpdis->rcItem.bottom, lpdis->itemData);
@@ -2170,7 +2170,7 @@ void SPY_DumpStructure (SPY_INSTANCE *sp_e, BOOL enter)
 	case WM_WINDOWPOSCHANGING:
 	    {
 		WINDOWPOS *lpwp = (WINDOWPOS *)sp_e->lParam;
-		TRACE("WINDOWPOS hwnd=0x%04x, after=0x%04x, at (%d,%d) w=%d h=%d, flags=0x%08x\n",
+		TRACE("WINDOWPOS hwnd=%p, after=%p, at (%d,%d) w=%d h=%d, flags=0x%08x\n",
 		      lpwp->hwnd, lpwp->hwndInsertAfter, lpwp->x, lpwp->y,
 		      lpwp->cx, lpwp->cy, lpwp->flags);
 	    }
@@ -2203,7 +2203,7 @@ void SPY_DumpStructure (SPY_INSTANCE *sp_e, BOOL enter)
 		p = SPY_Bsearch_Notify (&spnfy_array[0], end_spnfy_array,
 					pnmh->code);
 		if (p) {
-		    TRACE("NMHDR hwndFrom=0x%08x idFrom=0x%08x code=%s<0x%08x>, extra=0x%x\n",
+		    TRACE("NMHDR hwndFrom=%p idFrom=0x%08x code=%s<0x%08x>, extra=0x%x\n",
 			  pnmh->hwndFrom, pnmh->idFrom, p->name, pnmh->code, p->len);
 		    dumplen = p->len;
 
@@ -2223,7 +2223,7 @@ void SPY_DumpStructure (SPY_INSTANCE *sp_e, BOOL enter)
 		    }
 		}
 		else
-		    TRACE("NMHDR hwndFrom=0x%08x idFrom=0x%08x code=0x%08x\n",
+		    TRACE("NMHDR hwndFrom=%p idFrom=0x%08x code=0x%08x\n",
 			  pnmh->hwndFrom, pnmh->idFrom, pnmh->code);
 	    }
 	default:
@@ -2262,7 +2262,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
         break;
 
     case SPY_DISPATCHMESSAGE:
-        TRACE("%*s(%08x) %-16s message [%04x] %s dispatched  wp=%08x lp=%08lx\n",
+        TRACE("%*s(%p) %-16s message [%04x] %s dispatched  wp=%08x lp=%08lx\n",
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, wParam, lParam);
         break;
@@ -2281,7 +2281,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
                       indent, "", HWND_16(hWnd), debugstr_w(sp_e.wnd_name), msg,
                       sp_e.msg_name, taskName, wParam, lParam );
             else
-            {   TRACE("%*s(%08x) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
+            {   TRACE("%*s(%p) %-16s message [%04x] %s sent from %s wp=%08x lp=%08lx\n",
 			     indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
 			     sp_e.msg_name, taskName, wParam, lParam );
 		SPY_DumpStructure(&sp_e, TRUE);
@@ -2297,7 +2297,7 @@ void SPY_EnterMessage( INT iFlag, HWND hWnd, UINT msg,
 
     case SPY_DEFWNDPROC:
 	if( SPY_ExcludeDWP ) return;
-        TRACE("%*s(%08x)  DefWindowProc32: %s [%04x]  wp=%08x lp=%08lx\n",
+        TRACE("%*s(%p)  DefWindowProc32: %s [%04x]  wp=%08x lp=%08lx\n",
                         indent, "", hWnd, sp_e.msg_name,
                         msg, wParam, lParam );
         break;
@@ -2340,7 +2340,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
 	break;
 
     case SPY_RESULT_DEFWND:
-	TRACE(" %*s(%08x)  DefWindowProc32: %s [%04x] returned %08lx\n",
+	TRACE(" %*s(%p)  DefWindowProc32: %s [%04x] returned %08lx\n",
 			indent, "", hWnd, sp_e.msg_name, msg, lReturn );
 	break;
 
@@ -2351,7 +2351,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
         break;
 
     case SPY_RESULT_OK:
-        TRACE(" %*s(%08x) %-16s message [%04x] %s returned %08lx\n",
+        TRACE(" %*s(%p) %-16s message [%04x] %s returned %08lx\n",
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name, lReturn );
 	SPY_DumpStructure(&sp_e, FALSE);
@@ -2363,7 +2363,7 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
         break;
 
     case SPY_RESULT_INVALIDHWND:
-        WARN(" %*s(%08x) %-16s message [%04x] %s HAS INVALID HWND\n",
+        WARN(" %*s(%p) %-16s message [%04x] %s HAS INVALID HWND\n",
                         indent, "", hWnd, debugstr_w(sp_e.wnd_name), msg,
                         sp_e.msg_name );
         break;
diff --git a/windows/timer.c b/windows/timer.c
index bd6e7fe9582..0fac6bcbd7d 100644
--- a/windows/timer.c
+++ b/windows/timer.c
@@ -181,9 +181,8 @@ static UINT_PTR TIMER_SetTimer( HWND hwnd, UINT_PTR id, UINT timeout,
     pTimer->timeout = timeout;
     pTimer->proc    = winproc;
 
-    TRACE("Timer added: %p, %04x, %04x, %04x, %08lx\n",
-		   pTimer, pTimer->hwnd, pTimer->msg, pTimer->id,
-                   (DWORD)pTimer->proc );
+    TRACE("Timer added: %p, %p, %04x, %04x, %p\n",
+          pTimer, pTimer->hwnd, pTimer->msg, pTimer->id, pTimer->proc );
 
     LeaveCriticalSection( &csTimer );
 
@@ -255,8 +254,7 @@ UINT16 WINAPI SetTimer16( HWND16 hwnd, UINT16 id, UINT16 timeout,
 UINT_PTR WINAPI SetTimer( HWND hwnd, UINT_PTR id, UINT timeout,
                           TIMERPROC proc )
 {
-    TRACE("%04x %d %d %08lx\n",
-                   hwnd, id, timeout, (LONG)proc );
+    TRACE("%p %d %d %p\n", hwnd, id, timeout, proc );
     return TIMER_SetTimer( hwnd, id, timeout, (WNDPROC16)proc, WIN_PROC_32A, FALSE );
 }
 
@@ -305,8 +303,7 @@ UINT16 WINAPI SetSystemTimer16( HWND16 hwnd, UINT16 id, UINT16 timeout,
 UINT_PTR WINAPI SetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout,
                                 TIMERPROC proc )
 {
-    TRACE("%04x %d %d %08lx\n",
-                   hwnd, id, timeout, (LONG)proc );
+    TRACE("%p %d %d %p\n", hwnd, id, timeout, proc );
     return TIMER_SetTimer( hwnd, id, timeout, (WNDPROC16)proc, WIN_PROC_32A, TRUE );
 }
 
@@ -316,7 +313,7 @@ UINT_PTR WINAPI SetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout,
  */
 BOOL WINAPI KillTimer( HWND hwnd, UINT_PTR id )
 {
-    TRACE("%04x %d\n", hwnd, id );
+    TRACE("%p %d\n", hwnd, id );
     return TIMER_KillTimer( hwnd, id, FALSE );
 }
 
@@ -326,6 +323,6 @@ BOOL WINAPI KillTimer( HWND hwnd, UINT_PTR id )
  */
 BOOL WINAPI KillSystemTimer( HWND hwnd, UINT_PTR id )
 {
-    TRACE("%04x %d\n", hwnd, id );
+    TRACE("%p %d\n", hwnd, id );
     return TIMER_KillTimer( hwnd, id, TRUE );
 }
diff --git a/windows/user.c b/windows/user.c
index 1968d0769a7..8ea863ce341 100644
--- a/windows/user.c
+++ b/windows/user.c
@@ -310,7 +310,7 @@ LONG WINAPI ChangeDisplaySettingsExA(
 	LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags,
 	LPARAM lparam
 ) {
-  FIXME_(system)("(%s,%p,0x%04x,0x%08lx,0x%08lx), stub\n",devname,devmode,hwnd,flags,lparam);
+  FIXME_(system)("(%s,%p,%p,0x%08lx,0x%08lx), stub\n",devname,devmode,hwnd,flags,lparam);
   MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n");
   if (devmode==NULL)
     FIXME_(system)("   devmode=NULL (return to default mode)\n");
@@ -518,7 +518,7 @@ WORD WINAPI GetSystemDebugState16(void)
  *		RegisterLogonProcess (USER32.@)
  */
 DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) {
-	FIXME_(win32)("(%d,%d),stub!\n",hprocess,x);
+	FIXME_(win32)("(%p,%d),stub!\n",hprocess,x);
 	return 1;
 }
 
@@ -539,7 +539,7 @@ HWINSTA WINAPI CreateWindowStationW(
  *		SetProcessWindowStation (USER32.@)
  */
 BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) {
-	FIXME_(win32)("(%d),stub!\n",hWinSta);
+	FIXME_(win32)("(%p),stub!\n",hWinSta);
 	return TRUE;
 }
 
@@ -551,7 +551,7 @@ BOOL WINAPI SetUserObjectSecurity(
 	PSECURITY_INFORMATION pSIRequested,
 	PSECURITY_DESCRIPTOR pSID
 ) {
-	FIXME_(win32)("(0x%08x,%p,%p),stub!\n",hObj,pSIRequested,pSID);
+	FIXME_(win32)("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID);
 	return TRUE;
 }
 
@@ -587,7 +587,7 @@ HDESK WINAPI CreateDesktopW(
  *		EnumDesktopWindows (USER32.@)
  */
 BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) {
-  FIXME_(win32)("(0x%08x, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
+  FIXME_(win32)("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
   return TRUE;
 }
 
@@ -597,7 +597,7 @@ BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam
  */
 BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
 {
-    FIXME_(win32)("(0x%08x)\n", hWinSta);
+    FIXME_(win32)("(%p)\n", hWinSta);
     return TRUE;
 }
 
@@ -606,7 +606,7 @@ BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
  */
 BOOL WINAPI CloseDesktop(HDESK hDesk)
 {
-    FIXME_(win32)("(0x%08x)\n", hDesk);
+    FIXME_(win32)("(%p)\n", hDesk);
     return TRUE;
 }
 
@@ -622,7 +622,7 @@ DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
  *		SetLogonNotifyWindow (USER32.@)
  */
 DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) {
-	FIXME_(win32)("(0x%x,%04x),stub!\n",hwinsta,hwnd);
+	FIXME_(win32)("(%p,%p),stub!\n",hwinsta,hwnd);
 	return 1;
 }
 
@@ -637,14 +637,14 @@ VOID WINAPI LoadLocalFonts(VOID) {
  *		GetUserObjectInformationA (USER32.@)
  */
 BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
-{	FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
+{	FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
 	return TRUE;
 }
 /***********************************************************************
  *		GetUserObjectInformationW (USER32.@)
  */
 BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
-{	FIXME_(win32)("(0x%x %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
+{	FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
 	return TRUE;
 }
 /***********************************************************************
@@ -652,7 +652,7 @@ BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, D
  */
 BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
 	PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
-{	FIXME_(win32)("(0x%x %p %p len=%ld %p),stub!\n",  hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
+{	FIXME_(win32)("(%p %p %p len=%ld %p),stub!\n",  hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
 	return TRUE;
 }
 
@@ -660,7 +660,7 @@ BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequeste
  *		SetSystemCursor (USER32.@)
  */
 BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
-{	FIXME_(win32)("(%08x,%08lx),stub!\n",  hcur, id);
+{	FIXME_(win32)("(%p,%08lx),stub!\n",  hcur, id);
 	return TRUE;
 }
 
@@ -678,8 +678,6 @@ void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
 HDEVNOTIFY WINAPI RegisterDeviceNotificationA(
 	HANDLE hnd, LPVOID notifyfilter, DWORD flags
 ) {
-	FIXME_(win32)("(hwnd=%08x, filter=%p,flags=0x%08lx), STUB!\n",
-		hnd,notifyfilter,flags
-	);
-	return 0;
+    FIXME_(win32)("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags );
+    return 0;
 }
diff --git a/windows/win.c b/windows/win.c
index cbac6f1bb23..07e75fbf3ad 100644
--- a/windows/win.c
+++ b/windows/win.c
@@ -348,7 +348,7 @@ WND * WIN_FindWndPtr( HWND hwnd )
         }
         if (IsWindow( hwnd )) /* check other processes */
         {
-            ERR( "window %04x belongs to other process\n", hwnd );
+            ERR( "window %p belongs to other process\n", hwnd );
             /* DbgBreakPoint(); */
         }
     }
@@ -410,7 +410,7 @@ void WIN_LinkWindow( HWND hwnd, HWND parent, HWND hwndInsertAfter )
     if (!wndPtr) return;
     if (wndPtr == WND_OTHER_PROCESS)
     {
-        if (IsWindow(hwnd)) ERR(" cannot link other process window %x\n", hwnd );
+        if (IsWindow(hwnd)) ERR(" cannot link other process window %p\n", hwnd );
         return;
     }
 
@@ -443,7 +443,7 @@ HWND WIN_SetOwner( HWND hwnd, HWND owner )
     if (!win) return 0;
     if (win == WND_OTHER_PROCESS)
     {
-        if (IsWindow(hwnd)) ERR( "cannot set owner %x on other process window %x\n", owner, hwnd );
+        if (IsWindow(hwnd)) ERR( "cannot set owner %p on other process window %p\n", owner, hwnd );
         return 0;
     }
     SERVER_START_REQ( set_window_owner )
@@ -477,7 +477,7 @@ LONG WIN_SetStyle( HWND hwnd, LONG style )
     if (win == WND_OTHER_PROCESS)
     {
         if (IsWindow(hwnd))
-            ERR( "cannot set style %lx on other process window %x\n", style, hwnd );
+            ERR( "cannot set style %lx on other process window %p\n", style, hwnd );
         return 0;
     }
     if (style == win->dwStyle)
@@ -517,7 +517,7 @@ LONG WIN_SetExStyle( HWND hwnd, LONG style )
     if (win == WND_OTHER_PROCESS)
     {
         if (IsWindow(hwnd))
-            ERR( "cannot set exstyle %lx on other process window %x\n", style, hwnd );
+            ERR( "cannot set exstyle %lx on other process window %p\n", style, hwnd );
         return 0;
     }
     if (style == win->dwExStyle)
@@ -555,7 +555,7 @@ void WIN_SetRectangles( HWND hwnd, const RECT *rectWindow, const RECT *rectClien
     if (!win) return;
     if (win == WND_OTHER_PROCESS)
     {
-        if (IsWindow( hwnd )) ERR( "cannot set rectangles of other process window %x\n", hwnd );
+        if (IsWindow( hwnd )) ERR( "cannot set rectangles of other process window %p\n", hwnd );
         return;
     }
     SERVER_START_REQ( set_window_rectangles )
@@ -577,7 +577,7 @@ void WIN_SetRectangles( HWND hwnd, const RECT *rectWindow, const RECT *rectClien
         win->rectWindow = *rectWindow;
         win->rectClient = *rectClient;
 
-        TRACE( "win %x window (%d,%d)-(%d,%d) client (%d,%d)-(%d,%d)\n", hwnd,
+        TRACE( "win %p window (%d,%d)-(%d,%d) client (%d,%d)-(%d,%d)\n", hwnd,
                rectWindow->left, rectWindow->top, rectWindow->right, rectWindow->bottom,
                rectClient->left, rectClient->top, rectClient->right, rectClient->bottom );
     }
@@ -641,7 +641,7 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
     WND *wndPtr;
     HWND *list;
 
-    TRACE("%04x\n", hwnd );
+    TRACE("%p\n", hwnd );
 
     if (!(hwnd = WIN_IsCurrentThread( hwnd )))
     {
@@ -1007,7 +1007,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
     DCE *dce;
     BOOL unicode = (type == WIN_PROC_32W);
 
-    TRACE("%s %s ex=%08lx style=%08lx %d,%d %dx%d parent=%04x menu=%04x inst=%08x params=%p\n",
+    TRACE("%s %s ex=%08lx style=%08lx %d,%d %dx%d parent=%p menu=%p inst=%p params=%p\n",
           (type == WIN_PROC_32W) ? debugstr_w((LPWSTR)cs->lpszName) : debugstr_a(cs->lpszName),
           (type == WIN_PROC_32W) ? debugstr_w((LPWSTR)cs->lpszClass) : debugstr_a(cs->lpszClass),
           cs->dwExStyle, cs->style, cs->x, cs->y, cs->cx, cs->cy,
@@ -1035,7 +1035,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
 	/* Make sure parent is valid */
         if (!IsWindow( cs->hwndParent ))
         {
-            WARN("Bad parent %04x\n", cs->hwndParent );
+            WARN("Bad parent %p\n", cs->hwndParent );
 	    return 0;
 	}
         if ((cs->style & (WS_CHILD|WS_POPUP)) == WS_CHILD)
@@ -1188,7 +1188,7 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
     if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) && !GetWindow( hwnd, GW_OWNER ))
         HOOK_CallHooks( WH_SHELL, HSHELL_WINDOWCREATED, (WPARAM)hwnd, 0, TRUE );
 
-    TRACE("created window %04x\n", hwnd);
+    TRACE("created window %p\n", hwnd);
     return hwnd;
 }
 
@@ -1440,7 +1440,7 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
         return FALSE;
     }
 
-    TRACE("(%04x)\n", hwnd);
+    TRACE("(%p)\n", hwnd);
 
     /* Look whether the focus is within the tree of windows we will
      * be destroying.
@@ -1696,7 +1696,7 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
 
     hwnd = full_handle;
 
-    TRACE("( %x, %d )\n", hwnd, enable);
+    TRACE("( %p, %d )\n", hwnd, enable);
 
     if (!(wndPtr = WIN_GetPtr( hwnd ))) return FALSE;
     style = wndPtr->dwStyle;
@@ -1767,7 +1767,7 @@ WORD WINAPI GetWindowWord( HWND hwnd, INT offset )
         if (wndPtr == WND_OTHER_PROCESS)
         {
             if (IsWindow( hwnd ))
-                FIXME( "(%d) not supported yet on other process window %x\n", offset, hwnd );
+                FIXME( "(%d) not supported yet on other process window %p\n", offset, hwnd );
             SetLastError( ERROR_INVALID_WINDOW_HANDLE );
             return 0;
         }
@@ -1827,7 +1827,7 @@ WORD WINAPI SetWindowWord( HWND hwnd, INT offset, WORD newval )
     if (wndPtr == WND_OTHER_PROCESS)
     {
         if (IsWindow(hwnd))
-            FIXME( "set %d <- %x not supported yet on other process window %x\n",
+            FIXME( "set %d <- %x not supported yet on other process window %p\n",
                    offset, newval, hwnd );
         wndPtr = NULL;
     }
@@ -1880,7 +1880,7 @@ static LONG WIN_GetWindowLong( HWND hwnd, INT offset, WINDOWPROCTYPE type )
         if (offset >= 0)
         {
             if (IsWindow(hwnd))
-                FIXME( "(%d) not supported on other process window %x\n", offset, hwnd );
+                FIXME( "(%d) not supported on other process window %p\n", offset, hwnd );
             SetLastError( ERROR_INVALID_WINDOW_HANDLE );
             return 0;
         }
@@ -1981,7 +1981,7 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
     LONG retval = 0;
     WND *wndPtr;
 
-    TRACE( "%x %d %lx %x\n", hwnd, offset, newval, type );
+    TRACE( "%p %d %lx %x\n", hwnd, offset, newval, type );
 
     if (!WIN_IsCurrentProcess( hwnd ))
     {
@@ -2326,7 +2326,7 @@ BOOL WINAPI SetWindowTextA( HWND hwnd, LPCSTR lpString )
 {
     if (!WIN_IsCurrentProcess( hwnd ))
     {
-        FIXME( "cannot set text %s of other process window %x\n", debugstr_a(lpString), hwnd );
+        FIXME( "cannot set text %s of other process window %p\n", debugstr_a(lpString), hwnd );
         SetLastError( ERROR_ACCESS_DENIED );
         return FALSE;
     }
@@ -2341,7 +2341,7 @@ BOOL WINAPI SetWindowTextW( HWND hwnd, LPCWSTR lpString )
 {
     if (!WIN_IsCurrentProcess( hwnd ))
     {
-        FIXME( "cannot set text %s of other process window %x\n", debugstr_w(lpString), hwnd );
+        FIXME( "cannot set text %s of other process window %p\n", debugstr_w(lpString), hwnd );
         SetLastError( ERROR_ACCESS_DENIED );
         return FALSE;
     }
@@ -3068,7 +3068,7 @@ BOOL WINAPI FlashWindow( HWND hWnd, BOOL bInvert )
 {
     WND *wndPtr = WIN_FindWndPtr(hWnd);
 
-    TRACE("%04x\n", hWnd);
+    TRACE("%p\n", hWnd);
 
     if (!wndPtr) return FALSE;
     hWnd = wndPtr->hwndSelf;  /* make it a full handle */
@@ -3180,7 +3180,7 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
  */
 UINT WINAPI GetWindowModuleFileNameA( HWND hwnd, LPSTR lpszFileName, UINT cchFileNameMax)
 {
-    FIXME("GetWindowModuleFileNameA(hwnd 0x%x, lpszFileName %p, cchFileNameMax %u) stub!\n",
+    FIXME("GetWindowModuleFileNameA(hwnd %p, lpszFileName %p, cchFileNameMax %u) stub!\n",
           hwnd, lpszFileName, cchFileNameMax);
     return 0;
 }
@@ -3190,7 +3190,7 @@ UINT WINAPI GetWindowModuleFileNameA( HWND hwnd, LPSTR lpszFileName, UINT cchFil
  */
 UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPSTR lpszFileName, UINT cchFileNameMax)
 {
-    FIXME("GetWindowModuleFileNameW(hwnd 0x%x, lpszFileName %p, cchFileNameMax %u) stub!\n",
+    FIXME("GetWindowModuleFileNameW(hwnd %p, lpszFileName %p, cchFileNameMax %u) stub!\n",
           hwnd, lpszFileName, cchFileNameMax);
     return 0;
 }
diff --git a/windows/winpos.c b/windows/winpos.c
index 673b4aa6e09..45f7e90c3b1 100644
--- a/windows/winpos.c
+++ b/windows/winpos.c
@@ -161,7 +161,7 @@ BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect )
     if (ret)
     {
         MapWindowPoints( GetAncestor( hwnd, GA_PARENT ), 0, (POINT *)rect, 2 );
-        TRACE( "hwnd %04x (%d,%d)-(%d,%d)\n",
+        TRACE( "hwnd %p (%d,%d)-(%d,%d)\n",
                hwnd, rect->left, rect->top, rect->right, rect->bottom);
     }
     return ret;
@@ -179,7 +179,7 @@ int WINAPI GetWindowRgn ( HWND hwnd, HRGN hrgn )
     if (wndPtr == WND_OTHER_PROCESS)
     {
         if (IsWindow( hwnd ))
-            FIXME( "not supported on other process window %x\n", hwnd );
+            FIXME( "not supported on other process window %p\n", hwnd );
         wndPtr = NULL;
     }
     if (!wndPtr)
@@ -212,7 +212,7 @@ int WINAPI SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL bRedraw )
     if ((wndPtr = WIN_GetPtr( hwnd )) == WND_OTHER_PROCESS)
     {
         if (IsWindow( hwnd ))
-            FIXME( "not supported on other process window %x\n", hwnd );
+            FIXME( "not supported on other process window %p\n", hwnd );
         wndPtr = NULL;
     }
     if (!wndPtr)
@@ -384,7 +384,7 @@ HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest )
     int res;
     LONG style;
 
-    TRACE("scope %04x %ld,%ld\n", hwndScope, pt.x, pt.y);
+    TRACE("scope %p %ld,%ld\n", hwndScope, pt.x, pt.y);
 
     if (!hwndScope) hwndScope = GetDesktopWindow();
     style = GetWindowLongW( hwndScope, GWL_STYLE );
@@ -405,7 +405,7 @@ HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest )
             xy.y -= rectClient.top;
             if ((ret = find_child_from_point( hwndScope, xy, hittest, MAKELONG( pt.x, pt.y ) )))
             {
-                TRACE( "found child %x\n", ret );
+                TRACE( "found child %p\n", ret );
                 return ret;
             }
         }
@@ -415,14 +415,14 @@ HWND WINPOS_WindowFromPoint( HWND hwndScope, POINT pt, INT *hittest )
     if (!WIN_IsCurrentThread( hwndScope ))
     {
         *hittest = HTCLIENT;
-        TRACE( "returning %x\n", hwndScope );
+        TRACE( "returning %p\n", hwndScope );
         return hwndScope;
     }
     res = SendMessageA( hwndScope, WM_NCHITTEST, 0, MAKELONG( pt.x, pt.y ) );
     if (res != HTTRANSPARENT)
     {
         *hittest = res;  /* Found the window */
-        TRACE( "returning %x\n", hwndScope );
+        TRACE( "returning %p\n", hwndScope );
         return hwndScope;
     }
     *hittest = HTNOWHERE;
@@ -509,7 +509,7 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset )
             if (hwnd == hwndTo) return;
             if (!(wndPtr = WIN_GetPtr( hwnd )))
             {
-                ERR( "bad hwndFrom = %04x\n", hwnd );
+                ERR( "bad hwndFrom = %p\n", hwnd );
                 return;
             }
             if (wndPtr == WND_OTHER_PROCESS) goto other_process;
@@ -529,7 +529,7 @@ static void WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, POINT *offset )
         {
             if (!(wndPtr = WIN_GetPtr( hwnd )))
             {
-                ERR( "bad hwndTo = %04x\n", hwnd );
+                ERR( "bad hwndTo = %p\n", hwnd );
                 return;
             }
             if (wndPtr == WND_OTHER_PROCESS) goto other_process;
@@ -637,7 +637,7 @@ BOOL WINAPI LockSetForegroundWindow( UINT lockcode )
  *		SetShellWindow (USER32.@)
  */
 HWND WINAPI SetShellWindow(HWND hwndshell)
-{   WARN("(hWnd=%08x) semi stub\n",hwndshell );
+{   WARN("(hWnd=%p) semi stub\n",hwndshell );
 
     hGlobalShellWindow = WIN_GetFullHandle( hwndshell );
     return hGlobalShellWindow;
@@ -648,7 +648,7 @@ HWND WINAPI SetShellWindow(HWND hwndshell)
  *		GetShellWindow (USER32.@)
  */
 HWND WINAPI GetShellWindow(void)
-{   WARN("(hWnd=%x) semi stub\n",hGlobalShellWindow );
+{   WARN("(hWnd=%p) semi stub\n",hGlobalShellWindow );
 
     return hGlobalShellWindow;
 }
@@ -671,8 +671,7 @@ BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy,
 {
     int flags = SWP_NOZORDER | SWP_NOACTIVATE;
     if (!repaint) flags |= SWP_NOREDRAW;
-    TRACE("%04x %d,%d %dx%d %d\n",
-	    hwnd, x, y, cx, cy, repaint );
+    TRACE("%p %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint );
     return SetWindowPos( hwnd, 0, x, y, cx, cy, flags );
 }
 
@@ -736,7 +735,7 @@ BOOL WINPOS_ShowIconTitle( HWND hwnd, BOOL bShow )
     {
         HWND title = lpPos->hwndIconTitle;
 
-	TRACE("0x%04x %i\n", hwnd, (bShow != 0) );
+	TRACE("%p %i\n", hwnd, (bShow != 0) );
 
 	if( !title )
 	    lpPos->hwndIconTitle = title = ICONTITLE_Create( hwnd );
@@ -1064,7 +1063,7 @@ void WINPOS_ActivateOtherWindow(HWND hwnd)
 
  done:
     fg = GetForegroundWindow();
-    TRACE("win = %x fg = %x\n", hwndTo, fg);
+    TRACE("win = %p fg = %p\n", hwndTo, fg);
     if (!fg || (hwnd == fg))
     {
         if (SetForegroundWindow( hwndTo )) return;
@@ -1173,8 +1172,8 @@ BOOL WINAPI SetWindowPos( HWND hwnd, HWND hwndInsertAfter,
 {
     WINDOWPOS winpos;
 
-    TRACE("hwnd %x, after %x, %d,%d (%dx%d), flags %08x\n",
-	   hwnd, hwndInsertAfter, x, y, cx, cy, flags);
+    TRACE("hwnd %p, after %p, %d,%d (%dx%d), flags %08x\n",
+          hwnd, hwndInsertAfter, x, y, cx, cy, flags);
     if(TRACE_ON(win)) dump_winpos_flags(flags);
 
     winpos.hwnd = WIN_GetFullHandle(hwnd);
@@ -1358,7 +1357,7 @@ HWND WINAPI GetProgmanWindow(void)
  */
 HWND WINAPI SetShellWindowEx ( HWND hwndProgman, HWND hwndListView )
 {
-	FIXME("0x%08x 0x%08x stub\n",hwndProgman ,hwndListView );
+	FIXME("%p %p stub\n",hwndProgman ,hwndListView );
 	hGlobalShellWindow = hwndProgman;
 	return hGlobalShellWindow;
 
diff --git a/windows/winproc.c b/windows/winproc.c
index 6e30009dad6..b88f4510c09 100644
--- a/windows/winproc.c
+++ b/windows/winproc.c
@@ -175,7 +175,7 @@ static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg,
 
     hwnd = WIN_GetFullHandle( hwnd );
     if (TRACE_ON(relay))
-        DPRINTF( "%08lx:Call window proc %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
+        DPRINTF( "%08lx:Call window proc %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
                  GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
     /* To avoid any deadlocks, all the locks on the windows structures
        must be suspended before the control is passed to the application */
@@ -184,7 +184,7 @@ static LRESULT WINPROC_CallWndProc( WNDPROC proc, HWND hwnd, UINT msg,
     WIN_RestoreWndsLock(iWndsLocks);
 
     if (TRACE_ON(relay))
-        DPRINTF( "%08lx:Ret  window proc %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx) retval=%08lx\n",
+        DPRINTF( "%08lx:Ret  window proc %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx) retval=%08lx\n",
                  GetCurrentThreadId(), proc, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam, retvalue );
     return retvalue;
 }
@@ -2573,7 +2573,7 @@ static LRESULT WINPROC_CallProc32ATo32W( WNDPROC func, HWND hwnd,
     LRESULT result;
     int unmap;
 
-    TRACE_(msg)("func %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
+    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
 	func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
 
     if( (unmap = WINPROC_MapMsg32ATo32W( hwnd, msg, &wParam, &lParam )) == -1) {
@@ -2599,7 +2599,7 @@ static LRESULT WINPROC_CallProc32WTo32A( WNDPROC func, HWND hwnd,
     LRESULT result;
     int unmap;
 
-    TRACE_(msg)("func %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
+    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
 	func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
 
     if ((unmap = WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam )) == -1) {
@@ -2661,7 +2661,7 @@ static LRESULT WINAPI WINPROC_CallProc32ATo16( WNDPROC16 func, HWND hwnd,
     UINT16 msg16;
     MSGPARAM16 mp16;
 
-    TRACE_(msg)("func %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
+    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
 	func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
 
     mp16.lParam = lParam;
@@ -2686,7 +2686,7 @@ static LRESULT WINAPI WINPROC_CallProc32WTo16( WNDPROC16 func, HWND hwnd,
     UINT16 msg16;
     MSGPARAM16 mp16;
 
-    TRACE_(msg)("func %p (hwnd=%08x,msg=%s,wp=%08x,lp=%08lx)\n",
+    TRACE_(msg)("func %p (hwnd=%p,msg=%s,wp=%08x,lp=%08lx)\n",
 	func, hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam);
 
     mp16.lParam = lParam;
-- 
GitLab