SelectObject (hdc, hOldFont);
ReleaseDC (infoPtr->hwndSelf, hdc);
- TRACE("max string size %d x %d!\n", lpSize->cx, lpSize->cy);
+ TRACE("max string size %d x %d\n", lpSize->cx, lpSize->cy);
}
/***********************************************************************
if (btnPtr->fsStyle & BTNS_SEP) {
if (PtInRect (&btnPtr->rect, *lpPt)) {
- TRACE(" ON SEPARATOR %d!\n", i);
+ TRACE(" ON SEPARATOR %d\n", i);
return -i;
}
}
else {
if (PtInRect (&btnPtr->rect, *lpPt)) {
- TRACE(" ON BUTTON %d!\n", i);
+ TRACE(" ON BUTTON %d\n", i);
if (button)
*button = TRUE;
return i;
}
}
- TRACE(" NOWHERE!\n");
+ TRACE(" NOWHERE\n");
return TOOLBAR_NOWHERE;
}
SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
}
-
static void
TOOLBAR_TooltipAddTool(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *button)
{
btnInfo = (PCUSTOMBUTTON)SendDlgItemMessageW (hwnd, wParam, LB_GETITEMDATA, lpdis->itemID, 0);
if (btnInfo == NULL)
{
- FIXME("btnInfo invalid!\n");
+ FIXME("btnInfo invalid\n");
return TRUE;
}
switch (lpAddBmp->nID)
{
case IDB_STD_SMALL_COLOR:
+ case 2:
info.nButtons = 15;
info.nID = IDB_STD_SMALL;
break;
case IDB_STD_LARGE_COLOR:
+ case 3:
info.nButtons = 15;
info.nID = IDB_STD_LARGE;
break;
case IDB_VIEW_SMALL_COLOR:
+ case 6:
info.nButtons = 12;
info.nID = IDB_VIEW_SMALL;
break;
case IDB_VIEW_LARGE_COLOR:
+ case 7:
info.nButtons = 12;
info.nID = IDB_VIEW_LARGE;
break;
info.nID = IDB_HIST_LARGE;
break;
default:
+ WARN("unknown bitmap id, %ld\n", lpAddBmp->nID);
return -1;
}
- TRACE ("adding %d internal bitmaps!\n", info.nButtons);
+ TRACE ("adding %d internal bitmaps\n", info.nButtons);
/* Windows resize all the buttons to the size of a newly added standard image */
if (lpAddBmp->nID & 1)
info.nButtons = count;
info.hInst = lpAddBmp->hInst;
info.nID = lpAddBmp->nID;
- TRACE("adding %d bitmaps!\n", info.nButtons);
+ TRACE("adding %d bitmaps\n", info.nButtons);
}
/* check if the bitmap is already loaded and compute iSumButtons */
if (!infoPtr->cimlDef) {
/* create new default image list */
- TRACE ("creating default image list!\n");
+ TRACE ("creating default image list\n");
himlDef = ImageList_Create (infoPtr->nBitmapWidth, infoPtr->nBitmapHeight,
ILC_COLOR32 | ILC_MASK, info.nButtons, 2);
static LRESULT
TOOLBAR_AddButtonsT(TOOLBAR_INFO *infoPtr, INT nAddButtons, const TBBUTTON* lpTbb, BOOL fUnicode)
{
- TRACE("adding %d buttons (unicode=%d)!\n", nAddButtons, fUnicode);
+ TRACE("adding %d buttons (unicode=%d)\n", nAddButtons, fUnicode);
return TOOLBAR_InternalInsertButtonsT(infoPtr, -1, nAddButtons, lpTbb, fUnicode);
}
static LRESULT
TOOLBAR_AutoSize (TOOLBAR_INFO *infoPtr)
{
- TRACE("auto sizing, style=%x!\n", infoPtr->dwStyle);
+ TRACE("auto sizing, style=%#x\n", infoPtr->dwStyle);
TRACE("nRows: %d, infoPtr->nButtonHeight: %d\n", infoPtr->nRows, infoPtr->nButtonHeight);
if (!(infoPtr->dwStyle & CCS_NORESIZE))
TOOLBAR_TooltipDelTool(infoPtr, &infoPtr->buttons[nIndex]);
if (infoPtr->nNumButtons == 1) {
- TRACE(" simple delete!\n");
+ TRACE(" simple delete\n");
free_string( infoPtr->buttons );
Free (infoPtr->buttons);
infoPtr->buttons = NULL;
}
else {
TBUTTON_INFO *oldButtons = infoPtr->buttons;
- TRACE("complex delete! [nIndex=%d]\n", nIndex);
+ TRACE("complex delete [nIndex=%d]\n", nIndex);
infoPtr->nNumButtons--;
infoPtr->buttons = Alloc (sizeof (TBUTTON_INFO) * infoPtr->nNumButtons);
if (infoPtr->hwndToolTip) {
- FIXME("change tool tip!\n");
+ FIXME("change tool tip\n");
}
static LRESULT TOOLBAR_SetBoundingSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
SIZE * pSize = (SIZE*)lParam;
- FIXME("hwnd=%p, wParam=0x%08lx, size.cx=%d, size.cy=%d stub!\n", hwnd, wParam, pSize->cx, pSize->cy);
+ FIXME("hwnd=%p, wParam=0x%08lx, size.cx=%d, size.cy=%d stub\n", hwnd, wParam, pSize->cx, pSize->cy);
return 0;
}
static LRESULT
TOOLBAR_Size (TOOLBAR_INFO *infoPtr)
{
- TRACE("sizing toolbar!\n");
+ TRACE("sizing toolbar\n");
if (infoPtr->dwExStyle & TBSTYLE_EX_HIDECLIPPEDBUTTONS)
{
/* Check if the entry already exists */
c = TOOLBAR_GetImageListEntry(*pies, *cies, id);
+ /* Don't add new entry for NULL imagelist */
+ if (!c && !himl)
+ return NULL;
+
/* If this is a new entry we must create it and insert into the array */
if (!c)
{