Ignore:
Timestamp:
Mar 18, 2000, 5:17:35 PM (25 years ago)
Author:
cbratschi
Message:

Corel 20000317 merge, ccbase finished, bug fixes

File:
1 edited

Legend:

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

    r3145 r3154  
    1 /* $Id: tooltips.cpp,v 1.3 2000-03-17 17:13:26 cbratschi Exp $ */
     1/* $Id: tooltips.cpp,v 1.4 2000-03-18 16:17:32 cbratschi Exp $ */
    22/*
    33 * Tool tip control
     
    1717 */
    1818
    19 /* WINE 20000130 level */
     19/*
     20 - Corel WINE 20000317 level
     21 - (WINE 20000130 level)
     22*/
    2023
    2124#include <string.h>
     
    2326#include "winbase.h"
    2427#include "commctrl.h"
     28#include "ccbase.h"
    2529#include "tooltips.h"
    2630#include "comctl32.h"
     
    19261930
    19271931    /* allocate memory for info structure */
    1928     infoPtr = (TOOLTIPS_INFO *)COMCTL32_Alloc(sizeof(TOOLTIPS_INFO));
    1929     SetWindowLongA(hwnd,0,(DWORD)infoPtr);
     1932    infoPtr = (TOOLTIPS_INFO*)initControl(hwnd,sizeof(TOOLTIPS_INFO));
    19301933
    19311934    /* initialize info structure */
     
    19541957
    19551958    SetRectEmpty(&infoPtr->rcMargin);
    1956 
    1957     nResult = (INT)SendMessageA(GetParent(hwnd),WM_NOTIFYFORMAT,(WPARAM)hwnd,(LPARAM)NF_QUERY);
    1958 //    if (nResult == NFR_ANSI)
    1959 //      TRACE (tooltips, " -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
    1960 //    else if (nResult == NFR_UNICODE)
    1961 //      FIXME (tooltips, " -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
    1962 //    else
    1963 //      FIXME (tooltips, " -- WM_NOTIFYFORMAT returns: error!\n");
    19641959
    19651960    SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOZORDER | SWP_HIDEWINDOW | SWP_NOACTIVATE);
     
    20132008
    20142009    /* free tool tips info data */
    2015     COMCTL32_Free(infoPtr);
     2010    doneControl(hwnd);
    20162011
    20172012    return 0;
     
    20872082
    20882083    return DefWindowProcA (hwnd, WM_NCHITTEST, wParam, lParam);
    2089 }
    2090 
    2091 static LRESULT
    2092 TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
    2093 {
    2094 //    FIXME ("hwnd=%x wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
    2095 
    2096     return 0;
    20972084}
    20982085
     
    22442231        case WM_RBUTTONUP:
    22452232            infoPtr = TOOLTIPS_GetInfoPtr(lpttsi->hwndToolTip);
    2246                 nTool = TOOLTIPS_GetToolFromMessage (infoPtr, hwnd);
    2247 
    2248 //              TRACE (tooltips, "subclassed mouse message %04x\n", uMsg);
    2249                 infoPtr->nOldTool = infoPtr->nTool;
    2250                 infoPtr->nTool = nTool;
     2233            if (!infoPtr) break;
     2234            nTool = TOOLTIPS_GetToolFromMessage (infoPtr, hwnd);
     2235
     2236            infoPtr->nOldTool = infoPtr->nTool;
     2237            infoPtr->nTool = nTool;
    22512238            TOOLTIPS_Hide (lpttsi->hwndToolTip, infoPtr);
    22522239            break;
     
    22542241        case WM_MOUSEMOVE:
    22552242                infoPtr = TOOLTIPS_GetInfoPtr (lpttsi->hwndToolTip);
    2256                 //@@@AH 2000/02/25 check if there is a valid instance data pointer
    2257                 if (!infoPtr)
    2258                 {
    2259                   dprintf(("Tooltips:SubclassProc:WM_MOUSEMOVE: infoPtr == NULL!\n"));
    2260                   break;
    2261                 }
     2243                if (!infoPtr) break;
    22622244                nTool = TOOLTIPS_GetToolFromMessage (infoPtr, hwnd);
    22632245
    2264 //              TRACE (tooltips, "subclassed WM_MOUSEMOVE\n");
    22652246                infoPtr->nOldTool = infoPtr->nTool;
    22662247                infoPtr->nTool = nTool;
     
    22712252                    SetTimer (hwnd, ID_TIMERSHOW,
    22722253                                    infoPtr->nInitialTime, 0);
    2273 //                      TRACE (tooltips, "timer 1 started!\n");
     2254                      //TRACE (tooltips, "timer 1 started!\n");
    22742255                    }
    22752256                    else {
     
    24452426            return TOOLTIPS_NCHitTest (hwnd, wParam, lParam);
    24462427
    2447         case WM_NOTIFYFORMAT:
    2448             return TOOLTIPS_NotifyFormat (hwnd, wParam, lParam);
    2449 
    24502428        case WM_PAINT:
    24512429            return TOOLTIPS_Paint (hwnd, wParam, lParam);
     
    24642442//              ERR (tooltips, "unknown msg %04x wp=%08x lp=%08lx\n",
    24652443//                   uMsg, wParam, lParam);
    2466             return DefWindowProcA (hwnd, uMsg, wParam, lParam);
     2444            return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
    24672445    }
    24682446    return 0;
Note: See TracChangeset for help on using the changeset viewer.