Ignore:
Timestamp:
Oct 8, 1999, 9:34:25 PM (26 years ago)
Author:
dengert
Message:

fix miscoloured bitmaps

File:
1 edited

Legend:

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

    r1042 r1196  
    1 /* $Id: loadres.cpp,v 1.7 1999-09-25 14:15:54 sandervl Exp $ */
     1/* $Id: loadres.cpp,v 1.8 1999-10-08 19:34:25 dengert Exp $ */
    22
    33/*
     
    99 *
    1010 * Copyright 1993 Alexandre Julliard
    11  *           1998 Huw D M Davies
     11 *           1998 Huw D M Davies
    1212 *
    1313 * Project Odin Software License can be found in LICENSE.TXT
     
    2929 Win32Resource *winres;
    3030 LPWSTR  resstring;
    31  int    resstrlen = 0;
     31 int    resstrlen = 0;
    3232
    3333    winres = (Win32Resource *)FindResourceA(hinst, (LPSTR)wID, RT_STRINGA);
    3434    if(winres == NULL) {
    35         dprintf(("LoadStringA NOT FOUND from %X, id %d buffersize %d\n", hinst, wID, cchBuffer));
    36         return 0;
     35        dprintf(("LoadStringA NOT FOUND from %X, id %d buffersize %d\n", hinst, wID, cchBuffer));
     36        return 0;
    3737    }
    3838
    3939    resstring = (LPWSTR)winres->lockResource();
    4040    if(resstring) {
    41         resstrlen = min(lstrlenW(resstring)+1, cchBuffer);
    42         lstrcpynWtoA(lpBuffer, resstring, resstrlen);
    43         lpBuffer[resstrlen-1] = 0;
    44         resstrlen--;
    45         dprintf(("LoadStringA (%d) %s", resstrlen, lpBuffer));
     41        resstrlen = min(lstrlenW(resstring)+1, cchBuffer);
     42        lstrcpynWtoA(lpBuffer, resstring, resstrlen);
     43        lpBuffer[resstrlen-1] = 0;
     44        resstrlen--;
     45        dprintf(("LoadStringA (%d) %s", resstrlen, lpBuffer));
    4646    }
    4747    delete winres;
     
    5656 Win32Resource *winres;
    5757 LPWSTR resstring;
    58  int    resstrlen = 0;
     58 int    resstrlen = 0;
    5959
    6060    winres = (Win32Resource *)FindResourceW(hinst, (LPWSTR)wID, RT_STRINGW);
    6161    if(winres == NULL) {
    62         dprintf(("LoadStringW NOT FOUND from %X, id %d buffersize %d\n", hinst, wID, cchBuffer));
    63         return 0;
     62        dprintf(("LoadStringW NOT FOUND from %X, id %d buffersize %d\n", hinst, wID, cchBuffer));
     63        return 0;
    6464    }
    6565
    6666    resstring = (LPWSTR)winres->lockResource();
    6767    if(resstring) {
    68         resstrlen = min(lstrlenW(resstring)+1, cchBuffer);
    69         lstrcpynW(lpBuffer, resstring, resstrlen);
    70         lpBuffer[resstrlen-1] = 0;
    71         resstrlen--;
     68        resstrlen = min(lstrlenW(resstring)+1, cchBuffer);
     69        lstrcpynW(lpBuffer, resstring, resstrlen);
     70        lpBuffer[resstrlen-1] = 0;
     71        resstrlen--;
    7272    }
    7373    delete winres;
     
    8181{
    8282 Win32Resource *winres;
    83  HICON          hIcon;
     83 HICON          hIcon;
    8484
    8585    hIcon = OSLibWinQuerySysIcon((ULONG)lpszIcon);
    8686    if(hIcon == 0) {//not a system icon
    87         winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_ICONA);
    88         if(winres == 0) {
    89                 winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_GROUP_ICONA);
    90         }
    91         if(winres) {
    92                 hIcon = OSLibWinCreateIcon(winres->lockOS2Resource());
    93                 delete winres;
    94         }
     87        winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_ICONA);
     88        if(winres == 0) {
     89                winres = (Win32Resource *)FindResourceA(hinst, lpszIcon, RT_GROUP_ICONA);
     90        }
     91        if(winres) {
     92                hIcon = OSLibWinCreateIcon(winres->lockOS2Resource());
     93                delete winres;
     94        }
    9595    }
    9696    dprintf(("LoadIconA (%X) returned %x\n", hinst, hIcon));
     
    103103{
    104104 Win32Resource *winres;
    105  HICON          hIcon;
     105 HICON          hIcon;
    106106
    107107    hIcon = OSLibWinQuerySysIcon((ULONG)lpszIcon);
    108108    if(hIcon == 0) {//not a system icon
    109         winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_ICONW);
    110         if(winres == 0) {
    111                 winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_GROUP_ICONW);
    112         }
    113         if(winres) {
    114                 hIcon = OSLibWinCreateIcon(winres->lockOS2Resource());
    115                 delete winres;
    116         }
     109        winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_ICONW);
     110        if(winres == 0) {
     111                winres = (Win32Resource *)FindResourceW(hinst, lpszIcon, RT_GROUP_ICONW);
     112        }
     113        if(winres) {
     114                hIcon = OSLibWinCreateIcon(winres->lockOS2Resource());
     115                delete winres;
     116        }
    117117    }
    118118    dprintf(("LoadIconW (%X) returned %x\n", hinst, hIcon));
     
    125125{
    126126 Win32Resource *winres;
    127  HCURSOR        hCursor;
     127 HCURSOR        hCursor;
    128128
    129129    hCursor = OSLibWinQuerySysPointer((ULONG)lpszCursor);
    130130    if(hCursor == 0) {//not a system pointer
    131         winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_CURSORA);
    132         if(winres == 0) {
    133                 winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_GROUP_CURSORA);
    134         }
    135         if(winres) {
    136                 hCursor = OSLibWinCreatePointer(winres->lockOS2Resource());
    137                 delete winres;
    138         }
     131        winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_CURSORA);
     132        if(winres == 0) {
     133                winres = (Win32Resource *)FindResourceA(hinst, lpszCursor, RT_GROUP_CURSORA);
     134        }
     135        if(winres) {
     136                hCursor = OSLibWinCreatePointer(winres->lockOS2Resource());
     137                delete winres;
     138        }
    139139    }
    140140    if(HIWORD(lpszCursor)) {
    141         dprintf(("LoadCursorA %s from %x returned %x\n", lpszCursor, hinst, hCursor));
     141        dprintf(("LoadCursorA %s from %x returned %x\n", lpszCursor, hinst, hCursor));
    142142    }
    143143    else dprintf(("LoadCursorA %x from %x returned %x\n", lpszCursor, hinst, hCursor));
     
    150150{
    151151 Win32Resource *winres;
    152  HCURSOR        hCursor;
     152 HCURSOR        hCursor;
    153153
    154154    hCursor = OSLibWinQuerySysPointer((ULONG)lpszCursor);
    155155    if(hCursor == 0) {//not a system pointer
    156         winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_CURSORW);
    157         if(winres == 0) {
    158                 winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_GROUP_CURSORW);
    159         }
    160         if(winres) {
    161                 hCursor = OSLibWinCreatePointer(winres->lockOS2Resource());
    162                 delete winres;
    163         }
     156        winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_CURSORW);
     157        if(winres == 0) {
     158                winres = (Win32Resource *)FindResourceW(hinst, lpszCursor, RT_GROUP_CURSORW);
     159        }
     160        if(winres) {
     161                hCursor = OSLibWinCreatePointer(winres->lockOS2Resource());
     162                delete winres;
     163        }
    164164    }
    165165    dprintf(("LoadCursorW (%X) returned %x\n", hinst, hCursor));
     
    173173   switch(*id)
    174174   {
    175         case OBM_UPARROW_W:
    176         case OBM_DNARROW_W:
    177         case OBM_RGARROW_W:
    178         case OBM_LFARROW_W:
    179         case OBM_RESTORE_W:
    180         case OBM_RESTORED_W:
    181         case OBM_UPARROWD_W:
    182         case OBM_DNARROWD_W:
    183         case OBM_RGARROWD_W:
    184         case OBM_LFARROWD_W:
    185         case OBM_OLD_UPARROW_W:
    186         case OBM_OLD_DNARROW_W:
    187         case OBM_OLD_RGARROW_W:
    188         case OBM_OLD_LFARROW_W:
    189         case OBM_CHECK_W:
    190         case OBM_CHECKBOXES_W:
    191         case OBM_BTNCORNERS_W:
    192         case OBM_COMBO_W:
    193         case OBM_REDUCE_W:
    194         case OBM_REDUCED_W:
    195         case OBM_ZOOM_W:
    196         case OBM_ZOOMD_W:
    197         case OBM_SIZE_W:
    198         case OBM_CLOSE_W:
    199         case OBM_MNARROW_W:
    200         case OBM_UPARROWI_W:
    201         case OBM_DNARROWI_W:
    202         case OBM_RGARROWI_W:
    203         case OBM_LFARROWI_W:
    204                 return TRUE;
    205 
    206         //TODO: Not supported by Open32. Replacement may not be accurate
    207         case OBM_OLD_CLOSE_W:
    208                 *id = OBM_CLOSE_W;
    209                 return TRUE;
    210 
    211         case OBM_BTSIZE_W:
    212                 *id = OBM_SIZE_W;
    213                 return TRUE;
    214 
    215         case OBM_OLD_REDUCE_W:
    216                 *id = OBM_REDUCE_W;
    217                 return TRUE;
    218 
    219         case OBM_OLD_ZOOM_W:
    220                 *id = OBM_ZOOM_W;
    221                 return TRUE;
    222 
    223         case OBM_OLD_RESTORE_W:
    224                 *id = OBM_RESTORE_W;
    225                 return TRUE;
    226 
    227         default:
    228                 return FALSE;
     175        case OBM_UPARROW_W:
     176        case OBM_DNARROW_W:
     177        case OBM_RGARROW_W:
     178        case OBM_LFARROW_W:
     179        case OBM_RESTORE_W:
     180        case OBM_RESTORED_W:
     181        case OBM_UPARROWD_W:
     182        case OBM_DNARROWD_W:
     183        case OBM_RGARROWD_W:
     184        case OBM_LFARROWD_W:
     185        case OBM_OLD_UPARROW_W:
     186        case OBM_OLD_DNARROW_W:
     187        case OBM_OLD_RGARROW_W:
     188        case OBM_OLD_LFARROW_W:
     189        case OBM_CHECK_W:
     190        case OBM_CHECKBOXES_W:
     191        case OBM_BTNCORNERS_W:
     192        case OBM_COMBO_W:
     193        case OBM_REDUCE_W:
     194        case OBM_REDUCED_W:
     195        case OBM_ZOOM_W:
     196        case OBM_ZOOMD_W:
     197        case OBM_SIZE_W:
     198        case OBM_CLOSE_W:
     199        case OBM_MNARROW_W:
     200        case OBM_UPARROWI_W:
     201        case OBM_DNARROWI_W:
     202        case OBM_RGARROWI_W:
     203        case OBM_LFARROWI_W:
     204                return TRUE;
     205
     206        //TODO: Not supported by Open32. Replacement may not be accurate
     207        case OBM_OLD_CLOSE_W:
     208                *id = OBM_CLOSE_W;
     209                return TRUE;
     210
     211        case OBM_BTSIZE_W:
     212                *id = OBM_SIZE_W;
     213                return TRUE;
     214
     215        case OBM_OLD_REDUCE_W:
     216                *id = OBM_REDUCE_W;
     217                return TRUE;
     218
     219        case OBM_OLD_ZOOM_W:
     220                *id = OBM_ZOOM_W;
     221                return TRUE;
     222
     223        case OBM_OLD_RESTORE_W:
     224                *id = OBM_RESTORE_W;
     225                return TRUE;
     226
     227        default:
     228                return FALSE;
    229229   }
    230230}
     
    233233//******************************************************************************
    234234HANDLE LoadBitmapA(HINSTANCE hinst, LPCSTR lpszName, int cxDesired, int cyDesired,
    235                    UINT fuLoad)
     235                   UINT fuLoad)
    236236{
    237237    HBITMAP hbitmap = 0;
     
    252252    else
    253253    {
    254         if (!(hMapping = VIRTUAL_MapFileA( lpszName, (LPVOID *)&ptr ))) return 0;
    255         info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
     254        if (!(hMapping = VIRTUAL_MapFileA( lpszName, (LPVOID *)&ptr ))) return 0;
     255        info = (BITMAPINFO *)(ptr + sizeof(BITMAPFILEHEADER));
    256256    }
    257257
    258258    //TODO: This has to be removed once pe2lx stores win32 resources!!!
    259259    if (info->bmiHeader.biSize != sizeof(BITMAPCOREHEADER) &&
    260         info->bmiHeader.biSize != sizeof(BITMAPINFOHEADER))
     260        info->bmiHeader.biSize != sizeof(BITMAPINFOHEADER))
    261261    {//assume it contains a file header first
    262         info = (BITMAPINFO *)((char *)info + sizeof(BITMAPFILEHEADER));
    263     }
    264 
    265     size = DIB_BitmapInfoSize(info, DIB_RGB_COLORS);
     262        info = (BITMAPINFO *)((char *)info + sizeof(BITMAPFILEHEADER));
     263    }
     264
     265    if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) {
     266      size = sizeof(BITMAPINFOHEADER) +
     267             (sizeof (RGBTRIPLE) << ((BITMAPCOREHEADER *)info)->bcBitCount);
     268    } else
     269      size = DIB_BitmapInfoSize(info, DIB_RGB_COLORS);
     270
    266271    if ((hFix = GlobalAlloc(0, size)) != NULL) fix_info = (BITMAPINFO *)GlobalLock(hFix);
    267272    if (fix_info) {
    268273      BYTE pix;
    269274
    270       memcpy(fix_info, info, size);
    271       pix = *((LPBYTE)info+DIB_BitmapInfoSize(info, DIB_RGB_COLORS));
     275      if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) {
     276        ULONG colors;
     277        ULONG *p, *q;
     278
     279        memset (fix_info, 0, sizeof (BITMAPINFOHEADER));
     280        fix_info->bmiHeader.biSize     = sizeof (BITMAPINFOHEADER);
     281        fix_info->bmiHeader.biWidth    = ((BITMAPCOREHEADER *)info)->bcWidth;
     282        fix_info->bmiHeader.biHeight   = ((BITMAPCOREHEADER *)info)->bcHeight;
     283        fix_info->bmiHeader.biPlanes   = ((BITMAPCOREHEADER *)info)->bcPlanes;
     284        fix_info->bmiHeader.biBitCount = ((BITMAPCOREHEADER *)info)->bcBitCount;
     285
     286        p = (PULONG)((char *)info + sizeof(BITMAPCOREHEADER));
     287        q = (PULONG)((char *)fix_info + sizeof(BITMAPINFOHEADER));
     288        for (colors = 1 << fix_info->bmiHeader.biBitCount; colors > 0; colors--) {
     289          *q = *p & 0x00FFFFFFUL;
     290          q++;
     291          p = (PULONG)((char *)p + sizeof (RGBTRIPLE));
     292        }
     293      } else
     294        memcpy(fix_info, info, size);
     295
     296      size = DIB_BitmapInfoSize(info, DIB_RGB_COLORS);
     297      pix = *((LPBYTE)info + size);
    272298      DIB_FixColorsToLoadflags(fix_info, fuLoad, pix);
    273299      if ((hdc = GetDC(0)) != 0) {
    274         char *bits = (char *)info + size;
    275         if (fuLoad & LR_CREATEDIBSECTION) {
    276           DIBSECTION dib;
    277           hbitmap = CreateDIBSection(hdc, fix_info, DIB_RGB_COLORS, NULL, 0, 0);
    278           GetObjectA(hbitmap, sizeof(DIBSECTION), &dib);
    279           SetDIBits(hdc, hbitmap, 0, dib.dsBm.bmHeight, bits, info,
    280                     DIB_RGB_COLORS);
    281         }
    282         else {
    283           hbitmap = CreateDIBitmap( hdc, &fix_info->bmiHeader, CBM_INIT,
    284                                       bits, fix_info, DIB_RGB_COLORS );
    285         }
    286         ReleaseDC( 0, hdc );
     300        char *bits = (char *)info + size;
     301        if (fuLoad & LR_CREATEDIBSECTION) {
     302          DIBSECTION dib;
     303          hbitmap = CreateDIBSection(hdc, fix_info, DIB_RGB_COLORS, NULL, 0, 0);
     304          GetObjectA(hbitmap, sizeof(DIBSECTION), &dib);
     305          SetDIBits(hdc, hbitmap, 0, dib.dsBm.bmHeight, bits, info,
     306                    DIB_RGB_COLORS);
     307        }
     308        else {
     309          hbitmap = CreateDIBitmap( hdc, &fix_info->bmiHeader, CBM_INIT,
     310                                      bits, fix_info, DIB_RGB_COLORS );
     311        }
     312        ReleaseDC( 0, hdc );
    287313      }
    288314      GlobalUnlock(hFix);
     
    300326
    301327  if(IsSystemBitmap((ULONG *)&lpszBitmap)) {
    302         hBitmap = O32_LoadBitmap(hinst, lpszBitmap);
     328        hBitmap = O32_LoadBitmap(hinst, lpszBitmap);
    303329  }
    304330  else {
    305         hBitmap = LoadBitmapA(hinst, lpszBitmap, 0, 0, 0);
     331        hBitmap = LoadBitmapA(hinst, lpszBitmap, 0, 0, 0);
    306332  }
    307333  dprintf(("LoadBitmapA returned %08xh\n", hBitmap));
     
    317343
    318344  if(IsSystemBitmap((ULONG *)&lpszBitmap)) {
    319         hBitmap = O32_LoadBitmap(hinst, (LPCSTR)lpszBitmap);
     345        hBitmap = O32_LoadBitmap(hinst, (LPCSTR)lpszBitmap);
    320346  }
    321347  else {
    322         if(HIWORD(lpszBitmap) != 0) {
    323                 lpszBitmap = (LPWSTR)UnicodeToAsciiString((LPWSTR)lpszBitmap);
    324         }
    325         hBitmap = LoadBitmapA(hinst, (LPSTR)lpszBitmap, 0, 0, 0);
     348        if(HIWORD(lpszBitmap) != 0) {
     349                lpszBitmap = (LPWSTR)UnicodeToAsciiString((LPWSTR)lpszBitmap);
     350        }
     351        hBitmap = LoadBitmapA(hinst, (LPSTR)lpszBitmap, 0, 0, 0);
    326352  }
    327353
    328354  if(HIWORD(lpszBitmap) != 0)
    329         FreeAsciiString((LPSTR)lpszBitmap);
     355        FreeAsciiString((LPSTR)lpszBitmap);
    330356
    331357  dprintf(("LoadBitmapW returned %08xh\n", hBitmap));
     
    338364//******************************************************************************
    339365HANDLE WIN32API LoadImageA(HINSTANCE hinst, LPCSTR lpszName, UINT uType,
    340                            int cxDesired, int cyDesired, UINT fuLoad)
     366                           int cxDesired, int cyDesired, UINT fuLoad)
    341367{
    342368 HANDLE hRet = 0;
     
    345371
    346372  if (fuLoad & LR_DEFAULTSIZE) {
    347         if (uType == IMAGE_ICON) {
    348             if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXICON);
    349             if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYICON);
    350         }
    351         else if (uType == IMAGE_CURSOR) {
    352             if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXCURSOR);
    353             if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYCURSOR);
    354         }
     373        if (uType == IMAGE_ICON) {
     374            if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXICON);
     375            if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYICON);
     376        }
     377        else if (uType == IMAGE_CURSOR) {
     378            if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXCURSOR);
     379            if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYCURSOR);
     380        }
    355381  }
    356382  if (fuLoad & LR_LOADFROMFILE) fuLoad &= ~LR_SHARED;
    357383
    358384  switch(uType) {
    359         case IMAGE_BITMAP:
    360                 hRet = (HANDLE)LoadBitmapA(hinst, lpszName, cxDesired, cyDesired, fuLoad);
    361                 break;
    362         case IMAGE_CURSOR:
    363                 hRet = (HANDLE)LoadCursorA(hinst, lpszName);
    364                 break;
    365         case IMAGE_ICON:
    366                 hRet = (HANDLE)LoadIconA(hinst, lpszName);
    367                 break;
    368         default:
    369                 dprintf(("LoadImageA: unsupported type %d!!", uType));
    370                 return 0;
     385        case IMAGE_BITMAP:
     386                hRet = (HANDLE)LoadBitmapA(hinst, lpszName, cxDesired, cyDesired, fuLoad);
     387                break;
     388        case IMAGE_CURSOR:
     389                hRet = (HANDLE)LoadCursorA(hinst, lpszName);
     390                break;
     391        case IMAGE_ICON:
     392                hRet = (HANDLE)LoadIconA(hinst, lpszName);
     393                break;
     394        default:
     395                dprintf(("LoadImageA: unsupported type %d!!", uType));
     396                return 0;
    371397  }
    372398  dprintf(("LoadImageA returned %d\n", (int)hRet));
     
    377403//******************************************************************************
    378404HANDLE WIN32API LoadImageW(HINSTANCE hinst, LPCWSTR lpszName, UINT uType,
    379                               int cxDesired, int cyDesired, UINT fuLoad)
     405                              int cxDesired, int cyDesired, UINT fuLoad)
    380406{
    381407 HANDLE hRet = 0;
     
    384410
    385411  if (fuLoad & LR_DEFAULTSIZE) {
    386         if (uType == IMAGE_ICON) {
    387             if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXICON);
    388             if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYICON);
    389         }
    390         else if (uType == IMAGE_CURSOR) {
    391             if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXCURSOR);
    392             if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYCURSOR);
    393         }
     412        if (uType == IMAGE_ICON) {
     413            if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXICON);
     414            if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYICON);
     415        }
     416        else if (uType == IMAGE_CURSOR) {
     417            if (!cxDesired) cxDesired = GetSystemMetrics(SM_CXCURSOR);
     418            if (!cyDesired) cyDesired = GetSystemMetrics(SM_CYCURSOR);
     419        }
    394420  }
    395421  if (fuLoad & LR_LOADFROMFILE) fuLoad &= ~LR_SHARED;
    396422
    397423  switch(uType) {
    398         case IMAGE_BITMAP:
    399                 hRet = (HANDLE)LoadBitmapW(hinst, lpszName);
    400                 break;
    401         case IMAGE_CURSOR:
    402                 hRet = (HANDLE)LoadCursorW(hinst, lpszName);
    403                 break;
    404         case IMAGE_ICON:
    405                 hRet = (HANDLE)LoadIconW(hinst, lpszName);
    406                 break;
    407         default:
    408                 dprintf(("LoadImageW: unsupported type %d!!", uType));
    409                 return 0;
     424        case IMAGE_BITMAP:
     425                hRet = (HANDLE)LoadBitmapW(hinst, lpszName);
     426                break;
     427        case IMAGE_CURSOR:
     428                hRet = (HANDLE)LoadCursorW(hinst, lpszName);
     429                break;
     430        case IMAGE_ICON:
     431                hRet = (HANDLE)LoadIconW(hinst, lpszName);
     432                break;
     433        default:
     434                dprintf(("LoadImageW: unsupported type %d!!", uType));
     435                return 0;
    410436  }
    411437  dprintf(("LoadImageW returned %d\n", (int)hRet));
Note: See TracChangeset for help on using the changeset viewer.