]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dib.cpp
replaced wxYield() call in PopupMenu() by a much safer wxYieldForCommandsOnly() ...
[wxWidgets.git] / src / msw / dib.cpp
index 40531079da9c34eb20dc7a9b78ed98aada51aab6..5a9017faf0a4391c03bec5a7d3e37f53d7b8afbf 100644 (file)
@@ -159,9 +159,9 @@ WORD wxPaletteSize(VOID FAR * pv)
         NumColors = DibNumColors(lpbi);
 
         if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
         NumColors = DibNumColors(lpbi);
 
         if (lpbi->biSize == sizeof(BITMAPCOREHEADER))
-                return NumColors * sizeof(RGBTRIPLE);
+                return (WORD)(NumColors * sizeof(RGBTRIPLE));
         else
         else
-                return NumColors * sizeof(RGBQUAD);
+                return (WORD)(NumColors * sizeof(RGBQUAD));
 }
 
 /****************************************************************************
 }
 
 /****************************************************************************
@@ -528,7 +528,7 @@ BOOL wxReadDIB(LPTSTR lpFileName, HBITMAP *bitmap, HPALETTE *palette)
     }
 
     /* offset to the bits from start of DIB header */
     }
 
     /* 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)
     {
 
     if (bf.bfOffBits != 0L)
     {