Ignore:
Timestamp:
Nov 24, 2000, 2:16:26 PM (25 years ago)
Author:
sandervl
Message:

CopyIcon fix

File:
1 edited

Legend:

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

    r4677 r4689  
    1 /* $Id: winicon.cpp,v 1.17 2000-11-22 21:04:32 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.18 2000-11-24 13:16:26 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    900900            GlobalUnlock( Handle );
    901901            if(dwResGroupId == -1) {
     902                //todo: if scaling is necessary..
    902903                dprintf(("WARNING: no resource associated with icon/cursor -> copy without scaling!"));
    903904                hNew = CURSORICON_Copy(Handle);
     
    917918            */
    918919            hRsrc = FindResourceW(hInstance, (LPWSTR)dwResGroupId, bIsIcon ? RT_GROUP_ICONW : RT_GROUP_CURSORW);
    919             if(!hRsrc)  return 0;
     920            if(!hRsrc)  {
     921                goto notfound;
     922            }
    920923
    921924            if (!(hMem = LoadResource( hInstance, hRsrc)))
    922925            {
    923                 return 0;
     926                goto notfound;
    924927            }
    925928            if (!(pDir = (CURSORICONDIR*)LockResource( hMem )))
    926929            {
    927                 return 0;
     930                goto notfound;
    928931            }
    929932
     
    950953                MAKEINTRESOURCEW(wResId), bIsIcon ? RT_ICONW : RT_CURSORW)))
    951954            {
    952                 return 0;
     955                goto notfound;
    953956            }
    954957            if (!(hMem = LoadResource( hInstance, hRsrc )))
    955958            {
    956                 return 0;
     959                goto notfound;
    957960            }
    958961
     
    975978            hNew = CURSORICON_Copy(Handle);
    976979    }
     980    return hNew;
     981
     982notfound:
     983    dprintf(("WARNING: unable to find resource associated with icon/cursor -> copy without scaling!"));
     984    hNew = CURSORICON_Copy(Handle);
    977985    return hNew;
    978986}
Note: See TracChangeset for help on using the changeset viewer.