Changeset 8520 for trunk/src


Ignore:
Timestamp:
May 29, 2002, 5:41:03 PM (23 years ago)
Author:
sandervl
Message:

Match behaviour of ImageList_LoadImageA wrt cx parameter (when set to zero)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/imagelist.c

    r8382 r8520  
    19081908        BITMAP bmp;
    19091909        GetObjectA (handle, sizeof(BITMAP), &bmp);
     1910
     1911        /* To match windows behavior, if cx is set to zero and
     1912         the flag DI_DEFAULTSIZE is specified, cx becomes the
     1913         system metric value for icons. If the flag is not specified
     1914         the function sets the size to the height of the bitmap */
     1915        if (cx == 0)
     1916        {
     1917            if (uFlags & DI_DEFAULTSIZE)
     1918                cx = GetSystemMetrics (SM_CXICON);
     1919            else
     1920                cx = bmp.bmHeight;
     1921        }
     1922
    19101923        nImageCount = bmp.bmWidth / cx;
    19111924
Note: See TracChangeset for help on using the changeset viewer.