Changeset 184 for trunk/src/helpers/cctl_tooltip.c
- Timestamp:
- Jul 5, 2002, 9:13:36 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/cctl_tooltip.c
r169 r184 111 111 BOOL ctlRegisterTooltip(HAB hab) 112 112 { 113 return (WinRegisterClass(hab,114 115 116 117 118 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: 120 120 // one pointer for QWL_USER, 121 121 // one more for instance data … … 203 203 PSUBCLASSEDTOOL pstThis = (PSUBCLASSEDTOOL)pNode->pItemData; 204 204 if (pstThis->hwndTool == hwndTool) 205 { 206 return (pstThis); 207 } 205 return pstThis; 206 208 207 pNode = pNode->pNext; 209 208 } … … 327 326 static BOOL UnSubclassTool(HWND hwndTool) 328 327 { 329 PSUBCLASSEDTOOL pst = FindSubclassedTool(hwndTool);330 if (pst )328 PSUBCLASSEDTOOL pst; 329 if (pst = FindSubclassedTool(hwndTool)) 331 330 { 332 331 WinSubclassWindow(hwndTool, 333 332 pst->pfnwpOrig); 334 333 // orig winproc == un-subclass 335 return (lstRemoveItem(&G_llSubclassedTools, pst));334 return lstRemoveItem(&G_llSubclassedTools, pst); 336 335 // this frees the item 337 336 } 338 337 339 return (FALSE);338 return FALSE; 340 339 } 341 340 … … 446 445 447 446 // allocate and initialize tooltip data 448 pttd = (PTOOLTIPDATA)malloc(sizeof(TOOLTIPDATA)); 449 if (pttd) 447 if (pttd = (PTOOLTIPDATA)malloc(sizeof(TOOLTIPDATA))) 450 448 { 451 449 CHAR szFont[256]; … … 498 496 return (MPARAM)FALSE; 499 497 } 500 else 501 502 498 499 // malloc failed: 500 return (MPARAM)TRUE; 503 501 } 504 502 … … 543 541 } // end switch 544 542 545 return (TRUE);543 return TRUE; 546 544 } 547 545 … … 735 733 { 736 734 PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1); 737 PTOOLINFO ptiSearch = (PTOOLINFO)mp2;738 if (ptiSearch )735 PTOOLINFO ptiSearch; 736 if (ptiSearch = (PTOOLINFO)mp2) 739 737 { 740 738 PLISTNODE pToolNode = lstQueryFirstNode(&pttd->llTools); … … 962 960 { 963 961 PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1); 964 PTOOLINFO ptiTarget = (PTOOLINFO)mp2;965 if (ptiTarget )962 PTOOLINFO ptiTarget; 963 if (ptiTarget = (PTOOLINFO)mp2) 966 964 { 967 965 PTOOLINFO ptiFound = (PTOOLINFO)lstItemFromIndex(&pttd->llTools, … … 987 985 { 988 986 PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1); 989 PTOOLINFO ptiTarget = (PTOOLINFO)mp2;990 if (ptiTarget )987 PTOOLINFO ptiTarget; 988 if (ptiTarget = (PTOOLINFO)mp2) 991 989 { 992 990 if (pttd->ptiMouseOver) 993 991 { 994 992 memcpy(ptiTarget, pttd->ptiMouseOver, sizeof(TOOLINFO)); 995 return (M PARAM)TRUE;993 return (MRESULT)TRUE; 996 994 } 997 995 } 998 996 999 return ( (MPARAM)FALSE);997 return (MRESULT)FALSE; 1000 998 } 1001 999 … … 1010 1008 { 1011 1009 PTOOLTIPDATA pttd = (PTOOLTIPDATA)WinQueryWindowPtr(hwndTooltip, 1); 1012 PTOOLINFO ptiSearch = (PTOOLINFO)mp2;1013 if (ptiSearch )1010 PTOOLINFO ptiSearch; 1011 if (ptiSearch = (PTOOLINFO)mp2) 1014 1012 { 1015 1013 PLISTNODE pToolNode = lstQueryFirstNode(&pttd->llTools);
Note:
See TracChangeset
for help on using the changeset viewer.