Changeset 6486 for trunk/src


Ignore:
Timestamp:
Aug 8, 2001, 12:06:14 PM (24 years ago)
Author:
sandervl
Message:

update for single icon link

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/shelllink.c

    r6481 r6486  
    251251
    252252#ifdef __WIN32OS2__
    253 static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance, const char *szXPMFileName)
     253static BOOL SaveIconResAsOS2ICO(GRPICONDIR *pIconDir, HINSTANCE hInstance,
     254                                const char *szXPMFileName)
    254255{
    255256    FILE *fXPMFile;
     
    391392    {
    392393        hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_GROUP_ICONA);
     394#ifdef __WIN32OS2__
     395        if(!hResInfo) {
     396            hResInfo = FindResourceA(hModule, MAKEINTRESOURCEA(nIndex), RT_ICONA);       
     397            if(hResInfo) {
     398                GRPICONDIR icondir = {0};
     399
     400                icondir.idReserved = 0;
     401                icondir.idType     = 1;
     402                icondir.idCount    = 1;
     403                icondir.idEntries[0].nID = nIndex;
     404
     405                if(!SaveIconResAsOS2ICO(&icondir, hModule, szXPMFileName))
     406                {
     407                    TRACE("Failed saving icon as XPM, error %ld\n", GetLastError());
     408                    goto error3;
     409                }
     410                goto done;
     411            }
     412        }
     413#endif
    393414        TRACE("FindResourceA (%s) called, return 0x%x, error %ld\n", szFileName, hResInfo, GetLastError());
    394415    }
     
    455476    }
    456477#endif
     478
     479done:
    457480    FreeResource(hResData);
    458481    FreeLibrary(hModule);
Note: See TracChangeset for help on using the changeset viewer.