Ignore:
Timestamp:
Aug 8, 2000, 7:05:02 PM (25 years ago)
Author:
cbratschi
Message:

Corel WINE 20000807 changes - part 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/tooltips.cpp

    r3963 r3970  
    1 /* $Id: tooltips.cpp,v 1.10 2000-08-06 20:28:29 sandervl Exp $ */
     1/* $Id: tooltips.cpp,v 1.11 2000-08-08 17:05:01 cbratschi Exp $ */
    22/*
    33 * Tool tip control
     
    1818
    1919/*
    20  - Corel WINE 20000513 level
     20 - Corel WINE 20000807 level
    2121 - (WINE 20000130 level)
    2222*/
     
    341341    RECT rect, wndrect;
    342342    SIZE size;
    343     HDC  hdc;
    344343    NMHDR  hdr;
    345344
     
    424423
    425424    /* repaint the tooltip */
    426     hdc = GetDC (hwnd);
    427     TOOLTIPS_Draw(hwnd, hdc);
    428     ReleaseDC (hwnd, hdc);
     425    InvalidateRect(hwnd,NULL,TRUE);
     426    UpdateWindow(hwnd);
    429427
    430428    SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
     
    463461    TTTOOL_INFO *toolPtr;
    464462    RECT rect;
    465     HDC  hdc;
    466463    NMHDR hdr;
    467464
     
    498495                    SWP_SHOWWINDOW | SWP_NOACTIVATE );
    499496
    500     hdc = GetDC (hwnd);
    501     TOOLTIPS_Draw(hwnd, hdc);
    502     ReleaseDC (hwnd, hdc);
     497    InvalidateRect(hwnd,NULL,TRUE);
     498    UpdateWindow(hwnd);
    503499}
    504500
     
    740736          COMCTL32_Free(&lpttsi);
    741737        }
    742 //          else
    743 //              ERR (tooltips, "Invalid data handle!\n");
     738          //else
     739          //    ERR (tooltips, "Invalid data handle!\n");
    744740      } else
    745741      {
     
    750746          if (lpttsi->uRefCount == 1)
    751747          {
    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);
    754750            COMCTL32_Free(&lpttsi);
    755751          } else lpttsi->uRefCount--;
     
    15751571              } else
    15761572              {
    1577                 /*
    1578                 * Need to set nCurrentTool to nOldTool so we hide the tool.
    1579                 *  nTool and nOldTool values change when the mouse leaves the window.
    1580                 * If using TTM_UPDATETIPTEXT we can end up with an nCurrentTool = -1 if the
    1581                 * text can't be found, thus the tooltip would never be hidden.
    1582                 */
    1583                 if (infoPtr->nTool != infoPtr->nOldTool)
    1584                   infoPtr->nCurrentTool = infoPtr->nOldTool;
     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;
    15851581
    15861582                TOOLTIPS_Hide(hwnd,infoPtr);
     
    20432039            if (toolPtr->uFlags & TTF_SUBCLASS) {
    20442040                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);
    20512043                if (lpttsi) {
    20522044                    SetWindowLongA ((HWND)toolPtr->uId, GWL_WNDPROC,
    2053                                       (LONG)lpttsi->wpOrigProc);
     2045                              (LONG)lpttsi->wpOrigProc);
    20542046                    RemovePropA ((HWND)toolPtr->uId, COMCTL32_aSubclass);
    20552047                    COMCTL32_Free (&lpttsi);
    20562048                }
    20572049            }
     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         }
    20582061      }
    20592062      COMCTL32_Free (infoPtr->tools);
Note: See TracChangeset for help on using the changeset viewer.