X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3897b707bd39c491c820849953431e4a5751fced..ab93a576f47003ad05b1378ead108474b65b611c:/src/msw/curico.cpp diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp index 4e8f97154d..34b895da03 100644 --- a/src/msw/curico.cpp +++ b/src/msw/curico.cpp @@ -88,7 +88,7 @@ HICON CursorToIcon( wxChar *szFileName, HINSTANCE hInst, int *W, int *H) HANDLE ReadIcon( wxChar *szFileName, int *W, int *H) { ICONFILEHEADER iconFileHead; // ICON file header structure ICONFILERES iconFileRes; // ICON file resource - WORD cbHead, + UINT cbHead, cbRes, cbBits; // Used for reading in file int hFile; // File handle @@ -175,7 +175,7 @@ HANDLE ReadIcon( wxChar *szFileName, int *W, int *H) //* bitmaps. So, no need to convert the AND bitmask. * //* 7) Since a DIB is stored upside down, flip the monochrome AND bits* //* by scanlines. * -//* 8) Use the XOR and AND bits and create an icon with CreateIcon. * +//* 8) Use the XOR and AND bits and create an icon with CreateIcon. * //***************************************************************************** HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst) @@ -253,8 +253,8 @@ HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst) szFlip[(k - 1) - j] = *(DWORD FAR *)lpANDbits; // 8) Use the XOR and AND bits and create an icon with CreateIcon. - hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, bmpXor.bmPlanes, - bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB); + hIcon = CreateIcon( hInst, bmpXor.bmWidth, bmpXor.bmHeight, (BYTE)bmpXor.bmPlanes, + (BYTE)bmpXor.bmBitsPixel, (const BYTE *)szFlip, (const BYTE *)lpXorDDB); // Clean up before exiting. DeleteObject( hbmXor); @@ -335,7 +335,7 @@ HCURSOR IconToCursor( wxChar *szFileName, HINSTANCE hInst, int XHot, int YHot, HANDLE ReadCur( wxChar *szFileName, LPPOINT lpptHotSpot, int *W, int *H) { CURFILEHEADER curFileHead; // CURSOR file header structure CURFILERES curFileRes; // CURSOR file resource - WORD cbHead, + UINT cbHead, cbRes, cbBits; // Used for reading in file LPBITMAPINFO lpDIB; // Pointer to DIB memory @@ -644,9 +644,9 @@ WORD PaletteSize( LPSTR pv) NumColors = DIBNumColors((LPSTR )lpbi); if(lpbi->biSize == sizeof( BITMAPCOREHEADER)) // OS/2 style DIBs - return NumColors * sizeof( RGBTRIPLE); + return (WORD)(NumColors * sizeof( RGBTRIPLE)); else - return NumColors * sizeof( RGBQUAD); + return (WORD)(NumColors * sizeof( RGBQUAD)); } //***************************************************************************** @@ -672,7 +672,7 @@ WORD DIBNumColors ( LPSTR pv) // is in biClrUsed, whereas in the BITMAPCORE - style headers, it // is dependent on the bits per pixel ( = 2 raised to the power of // bits/pixel). - + if(lpbi->biSize != sizeof( BITMAPCOREHEADER)) { if(lpbi->biClrUsed != 0) @@ -843,7 +843,7 @@ HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint) /* * This doesn't work: just gives us a grey square. Ideas, anyone? */ - + HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap) { HDC hDCColor, hDCMono;