Ignore:
Timestamp:
Jun 28, 1999, 5:46:28 PM (26 years ago)
Author:
cbratschi
Message:

bug fixes (unicode) and improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/toolbar.c

    r180 r236  
    1 /* $Id: toolbar.c,v 1.6 1999-06-24 16:37:45 cbratschi Exp $ */
     1/* $Id: toolbar.c,v 1.7 1999-06-28 15:46:27 cbratschi Exp $ */
    22/*
    33 * Toolbar control
     
    2929 */
    3030
     31/* CB: Odin32/WINE bugs
     32  - IMAGELIST_Draw draws a line too much at the bottom of the bitmap
     33*/
     34
    3135#include <string.h>
    3236
     
    15141518            lstrcpynA (lpTbInfo->pszText,
    15151519                         (LPSTR)infoPtr->strings[btnPtr->iString],
    1516                          lpTbInfo->cchText);
     1520                         MIN(lpTbInfo->cchText,lstrlenA((LPSTR)infoPtr->strings[btnPtr->iString])));
    15171521    }
    15181522
     
    20572061    TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
    20582062
    2059     if ((LOWORD(lParam) <= 0) || (HIWORD(lParam)<=0)) return FALSE;
     2063    if ((LOWORD(lParam) <= 0) || (HIWORD(lParam) <= 0)) return FALSE;
    20602064
    20612065    infoPtr->nBitmapWidth = (INT)LOWORD(lParam);
     
    24742478
    24752479            nmttc.hdr.hwndFrom = hwnd;
    2476             nmttc.hdr.idFrom   = GetWindowLongA (hwnd, GWL_ID);
     2480            nmttc.hdr.idFrom   = GetWindowLongA(hwnd,GWL_ID);
    24772481            nmttc.hdr.code = NM_TOOLTIPSCREATED;
    24782482            nmttc.hwndToolTips = infoPtr->hwndToolTip;
    24792483
    2480             SendMessageA (infoPtr->hwndNotify, WM_NOTIFY,
    2481                           (WPARAM)nmttc.hdr.idFrom, (LPARAM)&nmttc);
     2484            SendMessageA(infoPtr->hwndNotify,WM_NOTIFY,(WPARAM)nmttc.hdr.idFrom,(LPARAM)&nmttc);
    24822485        }
    24832486    }
     
    26912694    INT   nHit;
    26922695    HDC   hdc;
     2696    DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
    26932697
    26942698    if (infoPtr->hwndToolTip)
     
    27112715          oldBtnPtr->bHot = FALSE;
    27122716
    2713           InvalidateRect (hwnd, &oldBtnPtr->rect, TRUE);
     2717          if (dwStyle & TBSTYLE_FLAT) InvalidateRect(hwnd,&oldBtnPtr->rect,TRUE);
    27142718        }
    27152719      }
     
    27232727          btnPtr->bHot = TRUE;
    27242728
    2725           hdc = GetDC (hwnd);
    2726           TOOLBAR_DrawButton (hwnd, btnPtr, hdc);
    2727           ReleaseDC (hwnd, hdc);
     2729          if (dwStyle & TBSTYLE_FLAT)
     2730          {
     2731            hdc = GetDC (hwnd);
     2732            TOOLBAR_DrawButton (hwnd, btnPtr, hdc);
     2733            ReleaseDC (hwnd, hdc);
     2734          }
    27282735
    27292736          infoPtr->nHotItem = nHit;
     
    28642871
    28652872    TOOLBAR_CalcToolbar(hwnd);
    2866     hdc = wParam==0 ? BeginPaint(hwnd,&ps) : (HDC)wParam;
     2873    hdc = wParam == 0 ? BeginPaint(hwnd,&ps) : (HDC)wParam;
    28672874    TOOLBAR_Refresh(hwnd,hdc);
    28682875    if (!wParam) EndPaint (hwnd, &ps);
Note: See TracChangeset for help on using the changeset viewer.