Ignore:
Timestamp:
Dec 5, 2002, 9:36:28 PM (23 years ago)
Author:
umoeller
Message:

New toolbar control.

File:
1 edited

Legend:

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

    r229 r232  
    112112{
    113113    return WinRegisterClass(hab,
    114                             COMCTL_TOOLTIP_CLASS,
     114                            WC_CCTL_TOOLTIP,
    115115                            ctl_fnwpTooltip,
    116116                            CS_HITTEST,     // class styles;
     
    295295    if (!FindSubclassedTool(hwndTool))
    296296    {
    297         PFNWP   pfnwpOrig = WinSubclassWindow(hwndTool,
    298                                               ctl_fnwpSubclassedTool);
    299         if (pfnwpOrig)
     297        PFNWP   pfnwpOrig;
     298        if (pfnwpOrig = WinSubclassWindow(hwndTool,
     299                                          ctl_fnwpSubclassedTool))
    300300        {
    301             PSUBCLASSEDTOOL pst = (PSUBCLASSEDTOOL)malloc(sizeof(SUBCLASSEDTOOL));
    302             if (pst)
     301            PSUBCLASSEDTOOL pst;
     302            if (pst = (PSUBCLASSEDTOOL)malloc(sizeof(SUBCLASSEDTOOL)))
    303303            {
    304304                pst->pfnwpOrig = pfnwpOrig;
     
    361361    HAB         hab;                // from WM_CREATE
    362362    USHORT      usTooltipID;        // from WM_CREATE
    363 
    364     LONG        cxScreen,
    365                 cyScreen;
    366363
    367364    BOOL        fIsActive;          // TRUE per default; changed by TTM_ACTIVATE
     
    457454        pttd->usTooltipID = pcs->id;
    458455
    459         pttd->cxScreen = WinQuerySysValue(HWND_DESKTOP, SV_CXSCREEN);
    460         pttd->cyScreen = WinQuerySysValue(HWND_DESKTOP, SV_CYSCREEN);
    461 
    462456        pttd->fIsActive = TRUE;
    463457
     
    11331127    if (ptlTooltip.y < 0)
    11341128        ptlTooltip.y = 0;
    1135     if (ptlTooltip.x + cx > pttd->cxScreen)
    1136         ptlTooltip.x = pttd->cxScreen-cx;
    1137     if (ptlTooltip.y + cy > pttd->cyScreen)
    1138         ptlTooltip.y = pttd->cyScreen-cy;
     1129    if (ptlTooltip.x + cx > G_cxScreen)
     1130        ptlTooltip.x = G_cxScreen - cx;
     1131    if (ptlTooltip.y + cy > G_cyScreen)
     1132        ptlTooltip.y = G_cyScreen - cy;
    11391133
    11401134    // if shadow is enabled,
     
    13501344 +          ctlRegisterTooltip(hab);
    13511345 +          hwndTooltip = WinCreateWindow(HWND_DESKTOP, // parent
    1352  +                           COMCTL_TOOLTIP_CLASS, // wnd class (comctl.h)
     1346 +                           WC_CCTL_TOOLTIP, // wnd class (comctl.h)
    13531347 +                           NULL,          // window text
    13541348 +                           TTS_ALWAYSTIP, // window style, ignored except for TTS_* flags
Note: See TracChangeset for help on using the changeset viewer.