Changeset 3970 for trunk/src/comctl32/tooltips.cpp
- Timestamp:
- Aug 8, 2000, 7:05:02 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/tooltips.cpp
r3963 r3970 1 /* $Id: tooltips.cpp,v 1.1 0 2000-08-06 20:28:29 sandervlExp $ */1 /* $Id: tooltips.cpp,v 1.11 2000-08-08 17:05:01 cbratschi Exp $ */ 2 2 /* 3 3 * Tool tip control … … 18 18 19 19 /* 20 - Corel WINE 20000 513level20 - Corel WINE 20000807 level 21 21 - (WINE 20000130 level) 22 22 */ … … 341 341 RECT rect, wndrect; 342 342 SIZE size; 343 HDC hdc;344 343 NMHDR hdr; 345 344 … … 424 423 425 424 /* repaint the tooltip */ 426 hdc = GetDC (hwnd); 427 TOOLTIPS_Draw(hwnd, hdc); 428 ReleaseDC (hwnd, hdc); 425 InvalidateRect(hwnd,NULL,TRUE); 426 UpdateWindow(hwnd); 429 427 430 428 SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0); … … 463 461 TTTOOL_INFO *toolPtr; 464 462 RECT rect; 465 HDC hdc;466 463 NMHDR hdr; 467 464 … … 498 495 SWP_SHOWWINDOW | SWP_NOACTIVATE ); 499 496 500 hdc = GetDC (hwnd); 501 TOOLTIPS_Draw(hwnd, hdc); 502 ReleaseDC (hwnd, hdc); 497 InvalidateRect(hwnd,NULL,TRUE); 498 UpdateWindow(hwnd); 503 499 } 504 500 … … 740 736 COMCTL32_Free(&lpttsi); 741 737 } 742 //else743 //ERR (tooltips, "Invalid data handle!\n");738 //else 739 // ERR (tooltips, "Invalid data handle!\n"); 744 740 } else 745 741 { … … 750 746 if (lpttsi->uRefCount == 1) 751 747 { 752 SetWindowLongA((HWND)toolPtr-> uId,GWL_WNDPROC,(LONG)lpttsi->wpOrigProc);753 RemovePropA((HWND)toolPtr-> uId,COMCTL32_aSubclass);748 SetWindowLongA((HWND)toolPtr->hwnd,GWL_WNDPROC,(LONG)lpttsi->wpOrigProc); 749 RemovePropA((HWND)toolPtr->hwnd,COMCTL32_aSubclass); 754 750 COMCTL32_Free(&lpttsi); 755 751 } else lpttsi->uRefCount--; … … 1575 1571 } else 1576 1572 { 1577 1578 1579 1580 1581 1582 1583 1584 1573 /* 1574 * Need to set nCurrentTool to nOldTool so we hide the tool. 1575 * nTool and nOldTool values change when the mouse leaves the window. 1576 * If using TTM_UPDATETIPTEXT we can end up with an nCurrentTool = -1 if the 1577 * text can't be found, thus the tooltip would never be hidden. 1578 */ 1579 if (infoPtr->nTool != infoPtr->nOldTool) 1580 infoPtr->nCurrentTool = infoPtr->nOldTool; 1585 1581 1586 1582 TOOLTIPS_Hide(hwnd,infoPtr); … … 2043 2039 if (toolPtr->uFlags & TTF_SUBCLASS) { 2044 2040 LPTT_SUBCLASS_INFO lpttsi; 2045 2046 if (toolPtr->uFlags & TTF_IDISHWND) 2047 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA ((HWND)toolPtr->uId, COMCTL32_aSubclass); 2048 else 2049 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA (toolPtr->hwnd, COMCTL32_aSubclass); 2050 2041 if (toolPtr->uFlags & TTF_IDISHWND) { 2042 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA ((HWND)toolPtr->uId, COMCTL32_aSubclass); 2051 2043 if (lpttsi) { 2052 2044 SetWindowLongA ((HWND)toolPtr->uId, GWL_WNDPROC, 2053 2045 (LONG)lpttsi->wpOrigProc); 2054 2046 RemovePropA ((HWND)toolPtr->uId, COMCTL32_aSubclass); 2055 2047 COMCTL32_Free (&lpttsi); 2056 2048 } 2057 2049 } 2050 else { 2051 lpttsi = (LPTT_SUBCLASS_INFO)GetPropA (toolPtr->hwnd, COMCTL32_aSubclass); 2052 2053 if (lpttsi) { 2054 SetWindowLongA ((HWND)toolPtr->hwnd, GWL_WNDPROC, 2055 (LONG)lpttsi->wpOrigProc); 2056 RemovePropA ((HWND)toolPtr->hwnd, COMCTL32_aSubclass); 2057 COMCTL32_Free (&lpttsi); 2058 } 2059 } 2060 } 2058 2061 } 2059 2062 COMCTL32_Free (infoPtr->tools);
Note:
See TracChangeset
for help on using the changeset viewer.