Changeset 4649 for trunk/src


Ignore:
Timestamp:
Nov 20, 2000, 9:28:16 PM (25 years ago)
Author:
sandervl
Message:

icon lookup fix (colors)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/winicon.cpp

    r4612 r4649  
    1 /* $Id: winicon.cpp,v 1.14 2000-11-18 14:08:54 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.15 2000-11-20 20:28:16 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    820820 */
    821821HGLOBAL CURSORICON_ExtCopy(HGLOBAL Handle, UINT nType,
    822                                    INT iDesiredCX, INT iDesiredCY,
    823                                        UINT nFlags)
     822                           INT iDesiredCX, INT iDesiredCY,
     823                           UINT nFlags)
    824824{
    825825    HGLOBAL hNew=0;
     
    827827    if(Handle == 0)
    828828    {
    829             return 0;
     829        return 0;
    830830    }
    831831    /* Best Fit or Monochrome */
     
    913913            pBits = (LPBYTE)LockResource( hMem );
    914914
    915                 if(nFlags & LR_DEFAULTSIZE)
    916                 {
    917                     iTargetCY = GetSystemMetrics(SM_CYICON);
     915            if(nFlags & LR_DEFAULTSIZE)
     916            {
     917                iTargetCY = GetSystemMetrics(SM_CYICON);
    918918                iTargetCX = GetSystemMetrics(SM_CXICON);
    919                 }
     919            }
    920920
    921921            /* Create a New Icon with the proper dimension
     
    974974            abs(height - entry->ResInfo.icon.bHeight) == iYDiff)
    975975        {
     976#ifdef __WIN32OS2__
     977            iTempColorDiff = abs(colors - (1 << entry->wBitCount));
     978#else
    976979            iTempColorDiff = abs(colors - entry->ResInfo.icon.bColorCount);
     980#endif
    977981            if(iColorDiff > iTempColorDiff)
    978982        {
Note: See TracChangeset for help on using the changeset viewer.