Ignore:
Timestamp:
Jul 5, 2002, 9:13:36 AM (23 years ago)
Author:
umoeller
Message:

Second round of fixes for 0.9.19.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/cctl_tooltip.c

    r169 r184  
    111111BOOL ctlRegisterTooltip(HAB hab)
    112112{
    113     return (WinRegisterClass(hab,
    114                              COMCTL_TOOLTIP_CLASS,
    115                              ctl_fnwpTooltip,
    116                              CS_HITTEST,     // class styles;
    117                                              // CS_FRAME not working,
    118                                              // CS_CLIPSIBLINGS not working
    119                              sizeof(PVOID)*2));   // addt'l bytes to reserve:
     113    return WinRegisterClass(hab,
     114                            COMCTL_TOOLTIP_CLASS,
     115                            ctl_fnwpTooltip,
     116                            CS_HITTEST,     // class styles;
     117                                            // CS_FRAME not working,
     118                                            // CS_CLIPSIBLINGS not working
     119                            sizeof(PVOID) * 2);   // addt'l bytes to reserve:
    120120                                    // one pointer for QWL_USER,
    121121                                    // one more for instance data
     
    203203        PSUBCLASSEDTOOL pstThis = (PSUBCLASSEDTOOL)pNode->pItemData;
    204204        if (pstThis->hwndTool == hwndTool)
    205         {
    206             return (pstThis);
    207         }
     205            return pstThis;
     206
    208207        pNode = pNode->pNext;
    209208    }
     
    327326static BOOL UnSubclassTool(HWND hwndTool)
    328327{
    329     PSUBCLASSEDTOOL pst = FindSubclassedTool(hwndTool);
    330     if (pst)
     328    PSUBCLASSEDTOOL pst;
     329    if (pst = FindSubclassedTool(hwndTool))
    331330    {
    332331        WinSubclassWindow(hwndTool,
    333332                          pst->pfnwpOrig);
    334333                            // orig winproc == un-subclass
    335         return (lstRemoveItem(&G_llSubclassedTools, pst));
     334        return lstRemoveItem(&G_llSubclassedTools, pst);
    336335                    // this frees the item
    337336    }
    338337
    339     return (FALSE);
     338    return FALSE;
    340339}
    341340
     
    446445
    447446    // allocate and initialize tooltip data
    448     pttd = (PTOOLTIPDATA)malloc(sizeof(TOOLTIPDATA));
    449     if (pttd)
     447    if (pttd = (PTOOLTIPDATA)malloc(sizeof(TOOLTIPDATA)))
    450448    {
    451449        CHAR        szFont[256];
     
    498496        return (MPARAM)FALSE;
    499497    }
    500     else
    501         // malloc failed:
    502         return (MPARAM)TRUE;
     498
     499    // malloc failed:
     500    return (MPARAM)TRUE;
    503501}
    504502
     
    543541    } // end switch
    544542
    545     return (TRUE);
     543    return TRUE;
    546544}
    547545
     
    735733{
    736734    PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1);
    737     PTOOLINFO ptiSearch = (PTOOLINFO)mp2;
    738     if (ptiSearch)
     735    PTOOLINFO ptiSearch;
     736    if (ptiSearch = (PTOOLINFO)mp2)
    739737    {
    740738        PLISTNODE pToolNode = lstQueryFirstNode(&pttd->llTools);
     
    962960{
    963961    PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1);
    964     PTOOLINFO ptiTarget = (PTOOLINFO)mp2;
    965     if (ptiTarget)
     962    PTOOLINFO ptiTarget;
     963    if (ptiTarget = (PTOOLINFO)mp2)
    966964    {
    967965        PTOOLINFO ptiFound = (PTOOLINFO)lstItemFromIndex(&pttd->llTools,
     
    987985{
    988986    PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1);
    989     PTOOLINFO ptiTarget = (PTOOLINFO)mp2;
    990     if (ptiTarget)
     987    PTOOLINFO ptiTarget;
     988    if (ptiTarget = (PTOOLINFO)mp2)
    991989    {
    992990        if (pttd->ptiMouseOver)
    993991        {
    994992            memcpy(ptiTarget, pttd->ptiMouseOver, sizeof(TOOLINFO));
    995             return (MPARAM)TRUE;
     993            return (MRESULT)TRUE;
    996994        }
    997995    }
    998996
    999     return ((MPARAM)FALSE);
     997    return (MRESULT)FALSE;
    1000998}
    1001999
     
    10101008{
    10111009    PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1);
    1012     PTOOLINFO ptiSearch = (PTOOLINFO)mp2;
    1013     if (ptiSearch)
     1010    PTOOLINFO ptiSearch;
     1011    if (ptiSearch = (PTOOLINFO)mp2)
    10141012    {
    10151013        PLISTNODE pToolNode = lstQueryFirstNode(&pttd->llTools);
Note: See TracChangeset for help on using the changeset viewer.