NumColors = DibNumColors(lpbi);
if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
- return NumColors * sizeof(RGBTRIPLE);
+ return (WORD)(NumColors * sizeof(RGBTRIPLE));
else
- return NumColors * sizeof(RGBQUAD);
+ return (WORD)(NumColors * sizeof(RGBQUAD));
}
/****************************************************************************
ul -= MAXREAD;
hp += MAXREAD;
}
- if (_lread(fh, (LPSTR) hp, (WORD) ul) != (WORD) ul)
+ if (_lread(fh, (LPSTR) hp, (WXUINT) ul) != (WXUINT) ul)
return 0;
return ulT;
}
ul -= MAXREAD;
hp += MAXREAD;
}
- if (_lwrite(fh, (LPSTR) hp, (WORD) ul) != (WORD) ul)
+ if (_lwrite(fh, (LPSTR) hp, (WXUINT) ul) != (WXUINT) ul)
return 0;
return ulT;
}
}
/* offset to the bits from start of DIB header */
- offBits = (WORD)lpbi->biSize + nNumColors * sizeof(RGBQUAD);
+ offBits = (WORD)(lpbi->biSize + nNumColors * sizeof(RGBQUAD));
if (bf.bfOffBits != 0L)
{
lpRGB = (RGBQUAD FAR *)((LPSTR)lpInfo + lpInfo->biSize);
/* copy colors from the color table to the LogPalette structure */
- for (i = 0; i < lpInfo->biClrUsed; i++, lpRGB++)
+ for (i = 0; (DWORD)i < lpInfo->biClrUsed; i++, lpRGB++)
{
npPal->palPalEntry[i].peRed = lpRGB->rgbRed;
npPal->palPalEntry[i].peGreen = lpRGB->rgbGreen;