Converted to the new debugging interface (done with the help of the
script written by Patrik Stridvall).
diff --git a/controls/listbox.c b/controls/listbox.c
index 50c7be8..a33924f 100644
--- a/controls/listbox.c
+++ b/controls/listbox.c
@@ -14,7 +14,7 @@
#include "spy.h"
#include "win.h"
#include "combo.h"
-#include "debug.h"
+#include "debugtools.h"
#include "tweak.h"
DECLARE_DEBUG_CHANNEL(combo)
@@ -106,14 +106,14 @@
LB_ITEMDATA *item;
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
- DUMP( "Listbox:\n" );
- DUMP( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
- wnd->hwndSelf, (UINT)descr, descr->heap, descr->nb_items,
- descr->top_item );
+ TRACE_(listbox)( "Listbox:\n" );
+ TRACE_(listbox)( "hwnd=%04x descr=%08x heap=%08x items=%d top=%d\n",
+ wnd->hwndSelf, (UINT)descr, descr->heap, descr->nb_items,
+ descr->top_item );
for (i = 0, item = descr->items; i < descr->nb_items; i++, item++)
{
- DUMP( "%4d: %-40s %d %08lx %3d\n",
- i, item->str, item->selected, item->data, item->height );
+ TRACE_(listbox)( "%4d: %-40s %d %08lx %3d\n",
+ i, item->str, item->selected, item->data, item->height );
}
}
@@ -324,7 +324,7 @@
if ((descr->height > descr->item_height) &&
(descr->height % descr->item_height))
{
- TRACE(listbox, "[%04x]: changing height %d -> %d\n",
+ TRACE_(listbox)("[%04x]: changing height %d -> %d\n",
wnd->hwndSelf, descr->height,
descr->height - descr->height%descr->item_height );
SetWindowPos( wnd->hwndSelf, 0, 0, 0,
@@ -335,7 +335,7 @@
return;
}
}
- TRACE(listbox, "[%04x]: new size = %d,%d\n",
+ TRACE_(listbox)("[%04x]: new size = %d,%d\n",
wnd->hwndSelf, descr->width, descr->height );
LISTBOX_UpdatePage( wnd, descr );
LISTBOX_UpdateScroll( wnd, descr );
@@ -464,7 +464,7 @@
if (action == ODA_FOCUS)
DrawFocusRect( hdc, rect );
else
- FIXME(listbox,"called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items);
+ FIXME_(listbox)("called with an out of bounds index %d(%d) in owner draw, Not good.\n",index,descr->nb_items);
return;
}
dis.CtlType = ODT_LISTBOX;
@@ -481,7 +481,7 @@
if (wnd->dwStyle & WS_DISABLED) dis.itemState |= ODS_DISABLED;
dis.itemData = item ? item->data : 0;
dis.rcItem = *rect;
- TRACE(listbox, "[%04x]: drawitem %d (%s) action=%02x "
+ TRACE_(listbox)("[%04x]: drawitem %d (%s) action=%02x "
"state=%02x rect=%d,%d-%d,%d\n",
wnd->hwndSelf, index, item ? item->str : "", action,
dis.itemState, rect->left, rect->top,
@@ -503,7 +503,7 @@
oldText = SetTextColor( hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
}
- TRACE(listbox, "[%04x]: painting %d (%s) action=%02x "
+ TRACE_(listbox)("[%04x]: painting %d (%s) action=%02x "
"rect=%d,%d-%d,%d\n",
wnd->hwndSelf, index, item ? item->str : "", action,
rect->left, rect->top, rect->right, rect->bottom );
@@ -633,7 +633,7 @@
if(TRACE_ON(listbox))
dsprintf(listbox, "%hd ", descr->tabs[i]);
}
- TRACE(listbox, "[%04x]: settabstops %s\n",
+ TRACE_(listbox)("[%04x]: settabstops %s\n",
wnd->hwndSelf, dbg_str(listbox));
}
else memcpy( descr->tabs, tabs, descr->nb_tabs * sizeof(INT) );
@@ -1013,7 +1013,7 @@
if (descr->style & LBS_OWNERDRAWVARIABLE)
{
if ((index < 0) || (index >= descr->nb_items)) return LB_ERR;
- TRACE(listbox, "[%04x]: item %d height = %d\n",
+ TRACE_(listbox)("[%04x]: item %d height = %d\n",
wnd->hwndSelf, index, height );
descr->items[index].height = height;
LISTBOX_UpdateScroll( wnd, descr );
@@ -1021,7 +1021,7 @@
}
else if (height != descr->item_height)
{
- TRACE(listbox, "[%04x]: new height = %d\n",
+ TRACE_(listbox)("[%04x]: new height = %d\n",
wnd->hwndSelf, height );
descr->item_height = height;
LISTBOX_UpdatePage( wnd, descr );
@@ -1043,7 +1043,7 @@
pos = descr->horz_extent - descr->width;
if (pos < 0) pos = 0;
if (!(diff = descr->horz_pos - pos)) return;
- TRACE(listbox, "[%04x]: new horz pos = %d\n",
+ TRACE_(listbox)("[%04x]: new horz pos = %d\n",
wnd->hwndSelf, pos );
descr->horz_pos = pos;
LISTBOX_UpdateScroll( wnd, descr );
@@ -1065,7 +1065,7 @@
return LB_OKAY;
if (extent <= 0) extent = 1;
if (extent == descr->horz_extent) return LB_OKAY;
- TRACE(listbox, "[%04x]: new horz extent = %d\n",
+ TRACE_(listbox)("[%04x]: new horz extent = %d\n",
wnd->hwndSelf, extent );
descr->horz_extent = extent;
if (descr->horz_pos > extent - descr->width)
@@ -1083,7 +1083,7 @@
{
width += 2; /* For left and right margin */
if (width == descr->column_width) return LB_OKAY;
- TRACE(listbox, "[%04x]: new column width = %d\n",
+ TRACE_(listbox)("[%04x]: new column width = %d\n",
wnd->hwndSelf, width );
descr->column_width = width;
LISTBOX_UpdatePage( wnd, descr );
@@ -1106,7 +1106,7 @@
if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE )))
{
- ERR(listbox, "unable to get DC.\n" );
+ ERR_(listbox)("unable to get DC.\n" );
return 16;
}
if (font) oldFont = SelectObject( hdc, font );
@@ -1338,7 +1338,7 @@
mis.itemHeight = descr->item_height;
SendMessageA( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis );
item->height = mis.itemHeight ? mis.itemHeight : 1;
- TRACE(listbox, "[%04x]: measure item %d (%s) = %d\n",
+ TRACE_(listbox)("[%04x]: measure item %d (%s) = %d\n",
wnd->hwndSelf, index, str ? str : "", item->height );
}
@@ -1390,7 +1390,7 @@
return ret;
}
- TRACE(listbox, "[%04x]: added item %d '%s'\n",
+ TRACE_(listbox)("[%04x]: added item %d '%s'\n",
wnd->hwndSelf, index, HAS_STRINGS(descr) ? new_str : "" );
return index;
}
@@ -1727,7 +1727,7 @@
WPARAM wParam, INT x, INT y )
{
INT index = LISTBOX_GetItemFromPoint( wnd, descr, x, y );
- TRACE(listbox, "[%04x]: lbuttondown %d,%d item %d\n",
+ TRACE_(listbox)("[%04x]: lbuttondown %d,%d item %d\n",
wnd->hwndSelf, x, y, index );
if (!descr->caret_on && (GetFocus() == wnd->hwndSelf)) return 0;
if (index != -1)
@@ -2074,7 +2074,7 @@
if( lphc )
{
- TRACE(combo,"[%04x]: resetting owner %04x -> %04x\n",
+ TRACE_(combo)("[%04x]: resetting owner %04x -> %04x\n",
wnd->hwndSelf, descr->owner, lphc->self->hwndSelf );
descr->owner = lphc->self->hwndSelf;
}
@@ -2144,7 +2144,7 @@
{
if (!LISTBOX_Create( wnd, NULL ))
return -1;
- TRACE(listbox, "creating wnd=%04x descr=%p\n",
+ TRACE_(listbox)("creating wnd=%04x descr=%p\n",
hwnd, *(LB_DESCR **)wnd->wExtra );
return 0;
}
@@ -2152,7 +2152,7 @@
return DefWindowProcA( hwnd, msg, wParam, lParam );
}
- TRACE(listbox, "[%04x]: msg %s wp %08x lp %08lx\n",
+ TRACE_(listbox)("[%04x]: msg %s wp %08x lp %08lx\n",
wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam );
switch(msg)
{
@@ -2529,7 +2529,7 @@
return DefWindowProcA( hwnd, msg, wParam, lParam );
default:
if ((msg >= WM_USER) && (msg < 0xc000))
- WARN(listbox, "[%04x]: unknown msg %04x wp %08x lp %08lx\n",
+ WARN_(listbox)("[%04x]: unknown msg %04x wp %08x lp %08lx\n",
hwnd, msg, wParam, lParam );
return DefWindowProcA( hwnd, msg, wParam, lParam );
}
@@ -2591,7 +2591,7 @@
{
LB_DESCR *descr = *(LB_DESCR **)wnd->wExtra;
- TRACE(combo, "[%04x]: msg %s wp %08x lp %08lx\n",
+ TRACE_(combo)("[%04x]: msg %s wp %08x lp %08lx\n",
wnd->hwndSelf, SPY_GetMsgName(msg), wParam, lParam );
if( descr || msg == WM_CREATE )
@@ -2602,7 +2602,7 @@
{
case WM_CREATE:
#define lpcs ((LPCREATESTRUCTA)lParam)
- TRACE(combo, "\tpassed parent handle = 0x%08x\n",
+ TRACE_(combo)("\tpassed parent handle = 0x%08x\n",
(UINT)lpcs->lpCreateParams);
lphc = (LPHEADCOMBO)(lpcs->lpCreateParams);
@@ -2649,7 +2649,7 @@
}
lRet = DefWindowProcA( hwnd, msg, wParam, lParam );
- TRACE(combo,"\t default on msg [%04x]\n", (UINT16)msg );
+ TRACE_(combo)("\t default on msg [%04x]\n", (UINT16)msg );
}
return lRet;
}