Ignore:
Timestamp:
Jan 19, 2002, 11:50:39 AM (24 years ago)
Author:
umoeller
Message:

Misc changes.

File:
1 edited

Legend:

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

    r123 r132  
    977977 */
    978978
    979 PANIMATIONDATA CreateAnimationData(HWND hwndStatic,
     979PANIMATIONDATA CreateAnimationData(HAB hab,
     980                                   HWND hwndStatic,
    980981                                   USHORT cAnimations)
    981982{
     
    996997            WinSetWindowULong(hwndStatic, QWL_USER, (ULONG)pa);
    997998
    998             pa->hab = WinQueryAnchorBlock(hwndStatic);
     999            pa->hab = hab;
    9991000            WinQueryWindowRect(hwndStatic, &pa->rclIcon);
    10001001            pa->OldStaticProc = WinSubclassWindow(hwndStatic, ctl_fnwpBitmapStatic);
     
    10461047{
    10471048    PANIMATIONDATA pa;
    1048 
    1049     if (pa = CreateAnimationData(hwndStatic,
    1050                                  usAnimCount))
     1049    HAB     hab;
     1050    if (    (hwndStatic)
     1051         && (hab = WinQueryAnchorBlock(hwndStatic))
     1052         && (WinIsWindow(hab, hwndStatic))
     1053         && (pa = CreateAnimationData(hab,
     1054                                      hwndStatic,
     1055                                      usAnimCount))
     1056       )
    10511057    {
    10521058        // switch static to icon mode
    10531059        pa->ulFlags = ANF_ICON;
     1060        return (pa);
    10541061    }
    10551062
    1056     return (pa);
     1063    return (NULL);
    10571064}
    10581065
     
    12331240{
    12341241    PANIMATIONDATA pa;
    1235 
    1236     if (pa = CreateAnimationData(hwndStatic, 1))
     1242    HAB hab;
     1243    if (    (hwndStatic)
     1244         && (hab = WinQueryAnchorBlock(hwndStatic))
     1245         && (WinIsWindow(hab, hwndStatic))
     1246         && (pa = CreateAnimationData(hab, hwndStatic, 1))
     1247       )
    12371248    {
    12381249        // switch static to bitmap mode
     
    12401251        if (fPreserveProportions)
    12411252            pa->ulFlags |= ANF_PROPORTIONAL;
     1253        return (pa);
    12421254    }
    12431255
    1244     return (pa);
     1256    return NULL;
    12451257}
    12461258
Note: See TracChangeset for help on using the changeset viewer.