Changeset 236 for trunk/src/comctl32/toolbar.c
- Timestamp:
- Jun 28, 1999, 5:46:28 PM (26 years ago)
- 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:45cbratschi Exp $ */1 /* $Id: toolbar.c,v 1.7 1999-06-28 15:46:27 cbratschi Exp $ */ 2 2 /* 3 3 * Toolbar control … … 29 29 */ 30 30 31 /* CB: Odin32/WINE bugs 32 - IMAGELIST_Draw draws a line too much at the bottom of the bitmap 33 */ 34 31 35 #include <string.h> 32 36 … … 1514 1518 lstrcpynA (lpTbInfo->pszText, 1515 1519 (LPSTR)infoPtr->strings[btnPtr->iString], 1516 lpTbInfo->cchText);1520 MIN(lpTbInfo->cchText,lstrlenA((LPSTR)infoPtr->strings[btnPtr->iString]))); 1517 1521 } 1518 1522 … … 2057 2061 TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd); 2058 2062 2059 if ((LOWORD(lParam) <= 0) || (HIWORD(lParam) <=0)) return FALSE;2063 if ((LOWORD(lParam) <= 0) || (HIWORD(lParam) <= 0)) return FALSE; 2060 2064 2061 2065 infoPtr->nBitmapWidth = (INT)LOWORD(lParam); … … 2474 2478 2475 2479 nmttc.hdr.hwndFrom = hwnd; 2476 nmttc.hdr.idFrom = GetWindowLongA (hwnd,GWL_ID);2480 nmttc.hdr.idFrom = GetWindowLongA(hwnd,GWL_ID); 2477 2481 nmttc.hdr.code = NM_TOOLTIPSCREATED; 2478 2482 nmttc.hwndToolTips = infoPtr->hwndToolTip; 2479 2483 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); 2482 2485 } 2483 2486 } … … 2691 2694 INT nHit; 2692 2695 HDC hdc; 2696 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 2693 2697 2694 2698 if (infoPtr->hwndToolTip) … … 2711 2715 oldBtnPtr->bHot = FALSE; 2712 2716 2713 InvalidateRect (hwnd, &oldBtnPtr->rect,TRUE);2717 if (dwStyle & TBSTYLE_FLAT) InvalidateRect(hwnd,&oldBtnPtr->rect,TRUE); 2714 2718 } 2715 2719 } … … 2723 2727 btnPtr->bHot = TRUE; 2724 2728 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 } 2728 2735 2729 2736 infoPtr->nHotItem = nHit; … … 2864 2871 2865 2872 TOOLBAR_CalcToolbar(hwnd); 2866 hdc = wParam ==0 ? BeginPaint(hwnd,&ps) : (HDC)wParam;2873 hdc = wParam == 0 ? BeginPaint(hwnd,&ps) : (HDC)wParam; 2867 2874 TOOLBAR_Refresh(hwnd,hdc); 2868 2875 if (!wParam) EndPaint (hwnd, &ps);
Note:
See TracChangeset
for help on using the changeset viewer.