Changeset 1668 for trunk/src/comctl32/imagelist.c
- Timestamp:
- Nov 9, 1999, 6:09:27 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/imagelist.c
r1058 r1668 1 /* $Id: imagelist.c,v 1. 7 1999-09-26 11:01:09 achimhaExp $ */1 /* $Id: imagelist.c,v 1.8 1999-11-09 17:09:26 cbratschi Exp $ */ 2 2 /* 3 3 * ImageList implementation … … 242 242 { 243 243 /* to obtain a transparent look, background color should be set 244 to white and foreground color to black when blting the 244 to white and foreground color to black when blting the 245 245 monochrome mask. */ 246 oldBkColor = SetBkColor(pimldp->hdcDst, RGB(0xff, 0xff, 0xff)); 246 oldBkColor = SetBkColor(pimldp->hdcDst, RGB(0xff, 0xff, 0xff)); 247 247 oldFgColor = SetTextColor(pimldp->hdcDst, RGB(0, 0, 0)); 248 248 … … 259 259 SRCPAINT); 260 260 261 SetBkColor(pimldp->hdcDst, oldBkColor); 262 261 SetBkColor(pimldp->hdcDst, oldBkColor); 262 SetTextColor(pimldp->hdcDst, oldFgColor); 263 263 } 264 264 /* Draw the image when no Background is specified … … 903 903 if (himl->cMaxImage > 0) { 904 904 himl->hbmImage = 905 905 CreateBitmap (himl->cx * himl->cMaxImage, himl->cy, 906 906 1, himl->uBitsPixel, NULL); 907 908 // 909 910 907 if (himl->hbmImage == 0) { 908 // ERR("Error creating image bitmap!\n"); 909 return NULL; 910 } 911 911 } 912 912 else 913 913 himl->hbmImage = 0; 914 914 915 915 if ( (himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) { 916 916 himl->hbmMask = CreateBitmap (himl->cx * himl->cMaxImage, himl->cy, … … 1456 1456 1457 1457 if ((himl == NULL) || (i < 0) || (i >= himl->cCurImage)) 1458 1458 return 0; 1459 1459 1460 1460 hdcSrc = CreateCompatibleDC(0); … … 1467 1467 hOldDstBitmap = (HBITMAP)SelectObject (hdcDst, ii.hbmMask); 1468 1468 if (himl->hbmMask) { 1469 1470 1471 1469 SelectObject (hdcSrc, himl->hbmMask); 1470 BitBlt (hdcDst, 0, 0, himl->cx, himl->cy, 1471 hdcSrc, i * himl->cx, 0, SRCCOPY); 1472 1472 } 1473 1473 else 1474 1474 PatBlt (hdcDst, 0, 0, himl->cx, himl->cy, BLACKNESS); 1475 1475 1476 1476 /* draw image*/ … … 1479 1479 SelectObject (hdcDst, ii.hbmColor); 1480 1480 BitBlt (hdcDst, 0, 0, himl->cx, himl->cy, 1481 1481 hdcSrc, i * himl->cx, 0, SRCCOPY); 1482 1482 1483 1483 /* … … 2136 2136 2137 2137 hBestFitIcon = CopyImage( 2138 hIcon, IMAGE_ICON, 2139 himl->cx, himl->cy, 2138 hIcon, IMAGE_ICON, 2139 himl->cx, himl->cy, 2140 2140 LR_COPYFROMRESOURCE); 2141 2141 … … 2185 2185 2186 2186 if(hBestFitIcon) 2187 2187 DestroyIcon(hBestFitIcon); 2188 2188 if (hdcImageList) 2189 2189 DeleteDC (hdcImageList);
Note:
See TracChangeset
for help on using the changeset viewer.