45#include "commoncontrols.h"
52#define MAX_OVERLAYIMAGE 15
62#define ImageList_Add Internal_Add
63#define ImageList_ReplaceIcon Internal_ReplaceIcon
64#define ImageList_SetOverlayImage Internal_SetOverlayImage
65#define ImageList_Replace Internal_Replace
66#define ImageList_AddMasked Internal_AddMasked
67#define ImageList_Remove Internal_Remove
68#define ImageList_GetIcon Internal_GetIcon
69#define ImageList_GetImageInfo Internal_GetImageInfo
70#define ImageList_Copy Internal_Copy
71#define ImageList_Merge Internal_Merge
72#define ImageList_Duplicate Internal_Duplicate
73#define ImageList_GetIconSize Internal_GetIconSize
74#define ImageList_SetIconSize Internal_SetIconSize
75#define ImageList_GetImageCount Internal_GetImageCount
76#define ImageList_SetImageCount Internal_SetImageCount
77#define ImageList_SetBkColor Internal_SetBkColor
78#define ImageList_GetBkColor Internal_GetBkColor
79#define ImageList_BeginDrag Internal_BeginDrag
80#define ImageList_DrawIndirect Internal_DrawIndirect
117#define IMAGELIST_MAGIC 0x53414D58
119#define IMAGELIST_MAGIC_DESTROYED 0x44454144
200 return ((
width *
bpp + 31) >> 3) & ~3;
206 *
abs(
info->bmiHeader.biHeight );
240 int mask_stride = (
info->bmiHeader.biWidth + 31) / 32 * 4;
249 for (
i = 0;
i <
height && !has_alpha;
i++)
251 if ((has_alpha = ((
bits[
i *
stride +
j] & 0xff000000) != 0)))
break;
257 if (!mask_info || !((mask_bits[
i * mask_stride +
j / 8] << (
j % 8)) & 0x80))
271 mask_bits[
i * mask_stride +
j / 8] &= ~(0x80 >> (
j % 8));
273 mask_bits[
i * mask_stride +
j / 8] |= 0x80 >> (
j % 8);
299 if (bm.bmBitsPixel != 32)
return FALSE;
302 mask_width = (bm.bmWidth + 31) / 32 * 4;
306 info->bmiHeader.biWidth = bm.bmWidth;
308 info->bmiHeader.biPlanes = 1;
309 info->bmiHeader.biBitCount = 32;
311 info->bmiHeader.biSizeImage = bm.bmWidth *
height * 4;
312 info->bmiHeader.biXPelsPerMeter = 0;
313 info->bmiHeader.biYPelsPerMeter = 0;
314 info->bmiHeader.biClrUsed = 0;
315 info->bmiHeader.biClrImportant = 0;
377 TRACE(
"Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n",
himl, sz.
cx, sz.
cy, nNewCount);
382 if (hbmNewBitmap == 0)
383 ERR(
"creating new image bitmap (x=%d y=%d)!\n", sz.
cx, sz.
cy);
400 if (hbmNewBitmap == 0)
401 ERR(
"creating new mask bitmap!\n");
451 INT nFirstIndex, nImageCount,
i;
455 TRACE(
"himl=%p hbmimage=%p hbmmask=%p\n",
himl, hbmImage, hbmMask);
462 TRACE(
"himl %p, cCurImage %d, cMaxImage %d, cGrow %d, cx %d, cy %d\n",
467 TRACE(
"%p has %d images (%d x %d) bpp %d\n", hbmImage, nImageCount,
bmp.bmWidth,
bmp.bmHeight,
494 for (
i=0;
i<nImageCount;
i++)
539#undef ImageList_AddIcon
604 if (
bmp.bmBitsPixel > 8)
639 INT dxHotspot,
INT dyHotspot)
644 TRACE(
"(himlTrack=%p iTrack=%d dx=%d dy=%d)\n", himlTrack, iTrack,
645 dxHotspot, dyHotspot);
661 WARN(
"Error creating drag image list!\n");
711 TRACE(
"himlDst=%p iDst=%d himlSrc=%p iSrc=%d\n", himlDst, iDst, himlSrc, iSrc);
715 if ((iDst < 0) || (iDst >= himlDst->
cCurImage))
717 if ((iSrc < 0) || (iSrc >= himlSrc->
cCurImage))
726 HBITMAP hbmTempImage, hbmTempMask;
745 himlDst->
hdcMask, ptDst.
x, ptDst.
y, himlDst->
cx, himlDst->
cy,
755 himlSrc->
hdcMask, ptSrc.
x, ptSrc.
y, himlSrc->
cx, himlSrc->
cy,
779 himlSrc->
hdcMask, ptSrc.
x, ptSrc.
y, himlSrc->
cx, himlSrc->
cy,
811 static const WORD aBitBlend25[] =
812 {0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00};
814 static const WORD aBitBlend50[] =
815 {0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA};
826 cGrow = (
WORD)((
max( cGrow, 1 ) + 3) & ~3);
831 WARN(
"grow %d too large, limiting to 256\n", cGrow );
883 ERR(
"Error creating mask bitmap!\n");
960 TRACE(
"(hwnd=%p x=%d y=%d)\n", hwndLock,
x,
y);
1003 FIXME(
"DragLeave hWnd != DragEnter hWnd\n");
1037 imldp.
cbSize =
sizeof(imldp);
1083 INT origNewX, origNewY;
1084 INT origOldX, origOldY;
1085 INT origRegX, origRegY;
1086 INT sizeRegX, sizeRegY;
1094 origRegX =
min(origNewX, origOldX);
1095 origRegY =
min(origNewY, origOldY);
1109 BitBlt(hdcOffScreen, 0, 0, sizeRegX, sizeRegY, hdcDrag,
1112 BitBlt(hdcOffScreen, origOldX - origRegX, origOldY - origRegY,
1117 hdcOffScreen, origNewX - origRegX, origNewY - origRegY,
SRCCOPY);
1120 origNewY - origRegY);
1122 BitBlt(hdcDrag, origRegX, origRegY, sizeRegX, sizeRegY,
1162 TRACE(
"bShow=0x%X!\n", bShow);
1271 imldp.
cbSize =
sizeof(imldp);
1279 imldp.
rgbBk = rgbBk;
1280 imldp.
rgbFg = rgbFg;
1298 void *
bits, *mask_bits;
1305 info->bmiHeader.biWidth =
cx;
1306 info->bmiHeader.biHeight =
cy;
1307 info->bmiHeader.biPlanes = 1;
1308 info->bmiHeader.biBitCount = 32;
1310 info->bmiHeader.biSizeImage =
cx *
cy * 4;
1311 info->bmiHeader.biXPelsPerMeter = 0;
1312 info->bmiHeader.biYPelsPerMeter = 0;
1313 info->bmiHeader.biClrUsed = 0;
1314 info->bmiHeader.biClrImportant = 0;
1324 TRACE(
"BitBlt failed\n");
1340 *
ptr = ((*
ptr & 0xff000000) |
1341 ((((*
ptr & 0x00ff0000) * 3 + (
r << 16)) / 4) & 0x00ff0000) |
1342 ((((*
ptr & 0x0000ff00) * 3 + (
g << 8)) / 4) & 0x0000ff00) |
1343 ((((*
ptr & 0x000000ff) * 3 + (
b << 0)) / 4) & 0x000000ff));
1348 *
ptr = ((*
ptr & 0xff000000) |
1349 ((((*
ptr & 0x00ff0000) + (
r << 16)) / 2) & 0x00ff0000) |
1350 ((((*
ptr & 0x0000ff00) + (
g << 8)) / 2) & 0x0000ff00) |
1351 ((((*
ptr & 0x000000ff) + (
b << 0)) / 2) & 0x000000ff));
1361 *
ptr = ((*
ptr & 0xff000000) |
1362 (((*
ptr & 0x00ff0000) *
alpha / 255) & 0x00ff0000) |
1363 (((*
ptr & 0x0000ff00) *
alpha / 255) & 0x0000ff00) |
1364 (((*
ptr & 0x000000ff) *
alpha / 255)));
1371 info->bmiHeader.biBitCount = 1;
1373 info->bmiColors[0].rgbRed = 0;
1374 info->bmiColors[0].rgbGreen = 0;
1375 info->bmiColors[0].rgbBlue = 0;
1376 info->bmiColors[0].rgbReserved = 0;
1377 info->bmiColors[1].rgbRed = 0xff;
1378 info->bmiColors[1].rgbGreen = 0xff;
1379 info->bmiColors[1].rgbBlue = 0xff;
1380 info->bmiColors[1].rgbReserved = 0;
1406 else *
ptr |= 0xff000000;
1409 ret =
GdiAlphaBlend( dest_dc, dest_x, dest_y,
cx,
cy,
hdc, 0, 0,
cx,
cy,
func );
1422 HDC *hdcImageListDC,
HDC *hdcMaskListDC)
1437 info->bmiHeader.biWidth =
cx;
1438 info->bmiHeader.biHeight =
cy;
1439 info->bmiHeader.biPlanes = 1;
1440 info->bmiHeader.biBitCount = 32;
1442 info->bmiHeader.biSizeImage =
cx *
cy * 4;
1443 info->bmiHeader.biXPelsPerMeter = 0;
1444 info->bmiHeader.biYPelsPerMeter = 0;
1445 info->bmiHeader.biClrUsed = 0;
1446 info->bmiHeader.biClrImportant = 0;
1452 TRACE(
"SelectObject failed\n");
1459 TRACE(
"BitBlt failed!\n");
1470 float mixed_color = (
GetRValue(orig_color) * .30 +
1505 *hdcMaskListDC = hdcMask;
1506 *hdcImageListDC =
hdc;
1528 DWORD fState, dwRop;
1531 HDC hImageDC, hImageListDC, hMaskListDC;
1532 HBITMAP hImageBmp, hOldImageBmp, hBlendMaskBmp;
1533 BOOL bIsTransparent, bBlend, bResult =
FALSE, bMask;
1557 bIsTransparent =
TRUE;
1559 bIsTransparent =
TRUE;
1563 TRACE(
"himl(%p) hbmMask(%p) iImage(%d) x(%d) y(%d) cx(%d) cy(%d)\n",
1576 if (!hImageListDC || !hImageDC || !hImageBmp ||
1577 (bBlend && !hBlendMaskBmp) || (
himl->
hbmMask && !hMaskListDC))
1588 oldImageBk =
SetBkColor( hImageDC,
RGB( 0xff, 0xff, 0xff ) );
1597 if (saturate_image(
himl, pimldp->
hdcDst, pimldp->
x, pimldp->
y,
1599 &hdcSaturated, &hdcSaturatedMask))
1601 hImageListDC = hdcSaturated;
1602 hMaskListDC = hdcSaturatedMask;
1612 if (!bMask && (has_alpha || (fState &
ILS_ALPHA)))
1619 blend_col = pimldp->
rgbFg;
1625 func.BlendFlags = 0;
1639 colour = pimldp->
rgbBk;
1646 alpha_blend_image(
himl, hImageListDC, hMaskListDC, hImageDC, 0, 0,
pt.x,
pt.y,
cx,
cy,
func, fStyle, blend_col );
1648 alpha_blend_image(
himl, hImageDC, 0, 0,
pt.x,
pt.y,
cx,
cy,
func, fStyle, blend_col );
1664 if( bIsTransparent )
1679 if( !bIsTransparent )
1681 colour = pimldp->
rgbBk;
1704 HDC hBlendMaskDC = hImageListDC;
1708 hOldBitmap =
SelectObject(hBlendMaskDC, hBlendMaskBmp);
1716 BitBlt(hBlendMaskDC, 0, 0,
cx,
cy, hMaskListDC,
pt.x,
pt.y, 0x220326);
1724 BitBlt (hImageDC, 0, 0,
cx,
cy, hBlendMaskDC, 0, 0, 0xB8074A);
1776 if (hdcSaturatedMask)
1806 ERR(
"Invalid image list handle!\n");
1938 if(!is_valid2(
himl))
2217 WARN(
"Couldn't load image\n");
2237 cx =
dib.dsBm.bmHeight;
2240 nImageCount =
dib.dsBm.bmWidth /
cx;
2305 INT xOff1, yOff1, xOff2, yOff2;
2309 TRACE(
"(himl1=%p i1=%d himl2=%p i2=%d dx=%d dy=%d)\n", himl1, i1, himl2,
2316 cxDst =
max (himl1->
cx,
dx + himl2->
cx);
2321 cxDst =
max (himl2->
cx, himl1->
cx -
dx);
2326 cxDst =
max (himl1->
cx, himl2->
cx);
2332 cyDst =
max (himl1->
cy,
dy + himl2->
cy);
2337 cyDst =
max (himl2->
cy, himl1->
cy -
dy);
2342 cyDst =
max (himl1->
cy, himl2->
cy);
2359 if (i1 >= 0 && i1 < himl1->cCurImage)
2361 if (i2 >= 0 && i2 < himl2->cCurImage)
2374 if (i1 >= 0 && i1 < himl1->cCurImage)
2376 if (i2 >= 0 && i2 < himl2->cCurImage)
2390 int bitsperpixel, palspace;
2393 if (
FAILED(IStream_Read ( pstm, &bmfh,
sizeof(bmfh),
NULL)))
2396 if (bmfh.
bfType != ((
'M'<<8)|
'B'))
2405 TRACE(
"width %u, height %u, planes %u, bpp %u\n",
2410 if (bitsperpixel<=8)
2411 palspace = (1<<bitsperpixel)*
sizeof(
RGBQUAD);
2469 void *image_bits, *mask_bits =
NULL;
2474 TRACE(
"%p\n", pstm);
2478 if (ilHead.
usMagic != ((
'L' << 8) |
'I'))
2483 TRACE(
"cx %u, cy %u, flags 0x%04x, cCurImage %u, cMaxImage %u\n",
2490 if (!(image_bits =
read_bitmap(pstm, image_info)))
2492 WARN(
"failed to read bitmap from stream\n");
2499 WARN(
"failed to read mask bitmap from stream\n");
2503 else mask_info =
NULL;
2508 BYTE *mask_ptr = mask_bits;
2570 HBITMAP hbmNewImage, hbmNewMask;
2577 ERR(
"Invalid image list handle!\n");
2582 TRACE(
"index out of range! %d\n",
i);
2592 TRACE(
"remove all on empty ImageList!\n");
2623 TRACE(
"Remove single image! %d\n",
i);
2626 TRACE(
" - Number of images: %d / %d (Old/New)\n",
2641 TRACE(
"Pre image copy: Copy %d images\n",
i);
2653 if (i < himl->cCurImage - 1) {
2654 TRACE(
"Post image copy!\n");
2710 TRACE(
"%p %d %p %p\n",
himl,
i, hbmImage, hbmMask);
2713 ERR(
"Invalid image list handle!\n");
2718 ERR(
"Invalid image index!\n");
2790 ERR(
"invalid image list\n");
2929 INT dxHotspot,
INT dyHotspot)
2937 TRACE(
" dxH=%d dyH=%d nX=%d nY=%d\n",
2943 dxHotspot, dyHotspot);
2992 FIXME(
"(%p 0x%x 0x%x):empty stub!\n",
himl,
i, dwFilter);
3093 INT nNewCount, nCopyCount;
3100 nNewCount = iImageCount + 1;
3107 if (hbmNewBitmap != 0)
3120 ERR(
"Could not create new image bitmap!\n");
3127 if (hbmNewBitmap != 0)
3140 ERR(
"Could not create new mask bitmap!\n");
3186 if ((iImage!=-1) && ((iImage < 0) || (iImage >
himl->
cCurImage)))
3203 INT bitCount, sizeImage, offBits, totalSize;
3210 bitCount = bm.bmBitsPixel;
3215 totalSize += (1 << bitCount) *
sizeof(
RGBQUAD);
3216 offBits = totalSize;
3217 totalSize += sizeImage;
3219 data = heap_alloc_zero(totalSize);
3222 lpBits =
data + offBits;
3225 bmfh->
bfType = ((
'M' << 8) |
'B');
3250 TRACE(
"width %u, height %u, planes %u, bpp %u\n",
3293 ilHead.
usMagic = ((
'L' << 8) |
'I');
3302 for(
i = 0;
i < 4;
i++) {
3306 TRACE(
"cx %u, cy %u, flags 0x04%x, cCurImage %u, cMaxImage %u\n",
3339 TRACE(
"Creating DIBSection %d x %d, %d Bits per Pixel\n",
3379 TRACE(
"returning %p\n", hbmNewBitmap);
3380 return hbmNewBitmap;
3406 if(!is_valid2(
himl))
3466 IImageList2_AddRef(iface);
3475 TRACE(
"(%p) refcount=%u\n", iface,
ref);
3484 TRACE(
"(%p) refcount=%u\n", iface,
ref);
3501 This->usMagic = IMAGELIST_MAGIC_DESTROYED;
3503 This->IImageList2_iface.lpVtbl =
NULL;
3548 int iImage,
int iOverlay)
3588 old_himl = pimldp->
himl;
3589 pimldp->
himl = imgl;
3593 pimldp->
himl = old_himl;
3645 if (
FAILED(IUnknown_QueryInterface(unk_src, &IID_IImageList,
3654 IImageList_Release(
src);
3675 if (
FAILED(IUnknown_QueryInterface(punk2, &IID_IImageList,
3688 IImageList_Release(iml2);
3772 int dxHotspot,
int dyHotspot)
3801 IUnknown *punk,
int iDrag,
int dxHotspot,
int dyHotspot)
3810 if (
FAILED(IUnknown_QueryInterface(punk, &IID_IImageList,
3817 IImageList_Release(iml2);
3844 IImageList_Release(idrag);
3863 if ((iOverlay < 0) || (iOverlay >
This->cCurImage))
3868 if (
This->nOvlIdx[
i] == iOverlay)
3880 FIXME(
"(%p)->(%d %d): stub\n", iface,
cx,
cy);
3916 FIXME(
"(%p)->(%d %d %x): stub\n", iface, first_image, last_image,
flags);
3928 FIXME(
"(%p)->(%p): stub\n", iface, stats);
3934 FIXME(
"(%p)->(%d %d %d %d %d): stub\n", iface,
cx,
cy,
flags, initial, grow);
3947 FIXME(
"(%p)->(%d %p %d %p %x): stub\n", iface,
i, imagelist,
src, unk,
flags);
4005 if (!
valid &&
himl &&
himl->usMagic == IMAGELIST_MAGIC_DESTROYED)
4007 ERR(
"Imagelist no longer valid: 0x%p\n",
himl);
4064 ret = IImageList2_QueryInterface(&
This->IImageList2_iface, iid,
ppv);
4065 IImageList2_Release(&
This->IImageList2_iface);
4075#undef ImageList_ReplaceIcon
4076#undef ImageList_SetOverlayImage
4077#undef ImageList_Replace
4078#undef ImageList_AddMasked
4079#undef ImageList_Remove
4080#undef ImageList_GetIcon
4081#undef ImageList_GetImageInfo
4082#undef ImageList_Copy
4083#undef ImageList_Merge
4084#undef ImageList_Duplicate
4085#undef ImageList_GetIconSize
4086#undef ImageList_SetIconSize
4087#undef ImageList_GetImageCount
4088#undef ImageList_SetImageCount
4089#undef ImageList_SetBkColor
4090#undef ImageList_GetBkColor
4091#undef ImageList_BeginDrag
4092#undef ImageList_DrawIndirect
4112 himl->usMagic == IMAGELIST_MAGIC_DESTROYED)
4114 ERR(
"Imagelist no longer valid: 0x%p\n",
himl);
4134 hr = piml->lpVtbl->
Add(piml, hbmImage, hbmMask, &
res);
4235 pimlDst = IImageList2_from_impl(himlDst);
4236 pimlSrc = IImageList2_from_impl(himlSrc);
4237 if (!pimlDst || !pimlSrc)
4249 piml1 = IImageList2_from_impl(himl1);
4250 piml2 = IImageList2_from_impl(himl2);
4251 if (!piml1 || !piml2)
4254 hr = piml1->lpVtbl->
Merge(piml1, i1, (
IUnknown*)piml2, i2,
dx,
dy, &IID_IImageList2, (
void**)&pimlMerged);
4266 piml = IImageList2_from_impl(himlSrc);
4270 hr = piml->lpVtbl->
Clone(piml, &IID_IImageList2, (
void**)&pimlCloned);
4357 INT dxHotspot,
INT dyHotspot)
4359 IImageList2* piml = IImageList2_from_impl(himlTrack);
4374 piml = IImageList2_from_impl(pimldp->
himl);
struct BITMAPINFOHEADER * LPBITMAPINFOHEADER
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
COMCTL32_SysColor comctl32_color
static HRESULT WINAPI ImageListImpl_DragEnter(IImageList2 *iface, HWND hwndLock, int x, int y)
static HRESULT WINAPI ImageListImpl_DiscardImages(IImageList2 *iface, INT first_image, INT last_image, DWORD flags)
static BOOL _write_bitmap(HBITMAP hBitmap, IStream *pstm)
BOOL WINAPI ImageList_SetIconSize(HIMAGELIST himl, INT cx, INT cy)
BOOL WINAPI ImageList_SetFilter(HIMAGELIST himl, INT i, DWORD dwFilter)
BOOL WINAPI ImageList_Draw(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, UINT fStyle)
static HRESULT WINAPI ImageListImpl_Merge(IImageList2 *iface, int i1, IUnknown *punk2, int i2, int dx, int dy, REFIID riid, void **ppv)
HRESULT WINAPI HIMAGELIST_QueryInterface(HIMAGELIST himl, REFIID riid, void **ppv)
BOOL WINAPI ImageList_Remove(HIMAGELIST himl, INT i)
static BOOL is_valid(HIMAGELIST himl)
static void imagelist_copy_images(HIMAGELIST himl, HDC hdcSrc, HDC hdcDest, UINT src, UINT count, UINT dest)
static HRESULT WINAPI ImageListImpl_GetOriginalSize(IImageList2 *iface, INT image, DWORD flags, INT *cx, INT *cy)
static HRESULT WINAPI ImageListImpl_SetImageCount(IImageList2 *iface, UINT count)
static int get_dib_stride(int width, int bpp)
static HRESULT WINAPI ImageListImpl_GetImageRect(IImageList2 *iface, int i, RECT *prc)
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk)
static HRESULT WINAPI ImageListImpl_Resize(IImageList2 *iface, INT cx, INT cy)
static HRESULT WINAPI ImageListImpl_Copy(IImageList2 *iface, int dst_index, IUnknown *unk_src, int src_index, UINT flags)
INT WINAPI ImageList_Add(HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
HIMAGELIST WINAPI ImageList_LoadImageA(HINSTANCE hi, LPCSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
BOOL WINAPI ImageList_Replace(HIMAGELIST himl, INT i, HBITMAP hbmImage, HBITMAP hbmMask)
static HRESULT WINAPI ImageListImpl_AddMasked(IImageList2 *iface, HBITMAP hbmImage, COLORREF crMask, int *pi)
BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST himl, INT iImage, INT iOverlay)
HIMAGELIST WINAPI ImageList_Duplicate(HIMAGELIST himlSrc)
static HRESULT WINAPI ImageListImpl_SetOriginalSize(IImageList2 *iface, INT image, INT cx, INT cy)
static void imagelist_point_from_index(HIMAGELIST himl, UINT index, LPPOINT pt)
INT WINAPI ImageList_ReplaceIcon(HIMAGELIST himl, INT nIndex, HICON hIcon)
static void IMAGELIST_InternalExpandBitmaps(HIMAGELIST himl, INT nImageCount)
static HRESULT WINAPI ImageListImpl_ForceImagePresent(IImageList2 *iface, INT image, DWORD flags)
static void add_dib_bits(HIMAGELIST himl, int pos, int count, int width, int height, BITMAPINFO *info, BITMAPINFO *mask_info, DWORD *bits, BYTE *mask_bits)
static HRESULT WINAPI ImageListImpl_GetDragImage(IImageList2 *iface, POINT *ppt, POINT *pptHotspot, REFIID riid, PVOID *ppv)
static HRESULT WINAPI ImageListImpl_EndDrag(IImageList2 *iface)
BOOL WINAPI ImageList_GetImageInfo(HIMAGELIST himl, INT i, IMAGEINFO *pImageInfo)
VOID WINAPI ImageList_EndDrag(void)
BOOL WINAPI ImageList_DragEnter(HWND hwndLock, INT x, INT y)
BOOL WINAPI ImageList_DragMove(INT x, INT y)
static HRESULT WINAPI ImageListImpl_GetIcon(IImageList2 *iface, int i, UINT flags, HICON *picon)
static HRESULT WINAPI ImageListImpl_Add(IImageList2 *iface, HBITMAP hbmImage, HBITMAP hbmMask, int *pi)
COLORREF WINAPI ImageList_GetBkColor(HIMAGELIST himl)
static HRESULT WINAPI ImageListImpl_ReplaceIcon(IImageList2 *iface, int i, HICON hicon, int *pi)
BOOL WINAPI ImageList_GetImageRect(HIMAGELIST himl, INT i, LPRECT lpRect)
BOOL WINAPI ImageList_DragLeave(HWND hwndLock)
static INTERNALDRAG InternalDrag
static UINT imagelist_height(UINT count)
static BOOL alpha_blend_image(HIMAGELIST himl, HDC dest_dc, int dest_x, int dest_y, int src_x, int src_y, int cx, int cy, BLENDFUNCTION func, UINT style, COLORREF blend_col)
HRESULT WINAPI ImageList_CoCreateInstance(REFCLSID rclsid, const IUnknown *punkOuter, REFIID riid, void **ppv)
static HRESULT WINAPI ImageListImpl_BeginDrag(IImageList2 *iface, int iTrack, int dxHotspot, int dyHotspot)
static HRESULT WINAPI ImageListImpl_DragLeave(IImageList2 *iface, HWND hwndLock)
static HRESULT WINAPI ImageListImpl_GetItemFlags(IImageList2 *iface, int i, DWORD *dwFlags)
BOOL WINAPI ImageList_DrawIndirect(IMAGELISTDRAWPARAMS *pimldp)
static void * read_bitmap(IStream *pstm, BITMAPINFO *bmi)
static HRESULT WINAPI ImageListImpl_SetBkColor(IImageList2 *iface, COLORREF clrBk, COLORREF *pclr)
static HRESULT WINAPI ImageListImpl_GetImageInfo(IImageList2 *iface, int i, IMAGEINFO *pImageInfo)
HIMAGELIST WINAPI ImageList_GetDragImage(POINT *ppt, POINT *pptHotspot)
static HRESULT WINAPI ImageListImpl_GetImageCount(IImageList2 *iface, int *pi)
static BOOL add_with_alpha(HIMAGELIST himl, HDC hdc, int pos, int count, int width, int height, HBITMAP hbmImage, HBITMAP hbmMask)
static HRESULT WINAPI ImageListImpl_Replace2(IImageList2 *iface, INT i, HBITMAP image, HBITMAP mask, IUnknown *unk, DWORD flags)
DWORD WINAPI ImageList_SetFlags(HIMAGELIST himl, DWORD flags)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
static HRESULT WINAPI ImageListImpl_DragShowNolock(IImageList2 *iface, BOOL fShow)
UINT WINAPI ImageList_SetColorTable(HIMAGELIST himl, UINT uStartIndex, UINT cEntries, const RGBQUAD *prgb)
static HRESULT WINAPI ImageListImpl_GetBkColor(IImageList2 *iface, COLORREF *pclr)
BOOL WINAPI ImageList_DrawEx(HIMAGELIST himl, INT i, HDC hdc, INT x, INT y, INT dx, INT dy, COLORREF rgbBk, COLORREF rgbFg, UINT fStyle)
static HRESULT WINAPI ImageListImpl_Draw(IImageList2 *iface, IMAGELISTDRAWPARAMS *pimldp)
static HRESULT WINAPI ImageListImpl_Replace(IImageList2 *iface, int i, HBITMAP hbmImage, HBITMAP hbmMask)
static void imagelist_get_bitmap_size(HIMAGELIST himl, UINT count, SIZE *sz)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
static HBITMAP ImageList_CreateImage(HDC hdc, HIMAGELIST himl, UINT count)
HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2, INT dx, INT dy)
static HRESULT WINAPI ImageListImpl_DragMove(IImageList2 *iface, int x, int y)
static HRESULT WINAPI ImageListImpl_GetIconSize(IImageList2 *iface, int *cx, int *cy)
HICON WINAPI ImageList_GetIcon(HIMAGELIST himl, INT i, UINT fStyle)
static HRESULT WINAPI ImageListImpl_GetStatistics(IImageList2 *iface, IMAGELISTSTATS *stats)
BOOL WINAPI ImageList_Write(HIMAGELIST himl, IStream *pstm)
static HRESULT WINAPI ImageListImpl_Clone(IImageList2 *iface, REFIID riid, void **ppv)
BOOL WINAPI ImageList_Copy(HIMAGELIST himlDst, INT iDst, HIMAGELIST himlSrc, INT iSrc, UINT uFlags)
static HRESULT WINAPI ImageListImpl_SetOverlayImage(IImageList2 *iface, int iImage, int iOverlay)
static ULONG WINAPI ImageListImpl_Release(IImageList2 *iface)
static HRESULT WINAPI ImageListImpl_QueryInterface(IImageList2 *iface, REFIID iid, void **ppv)
static void ImageList_InternalDragDraw(HDC hdc, INT x, INT y)
static HRESULT WINAPI ImageListImpl_GetOverlayImage(IImageList2 *iface, int iOverlay, int *piIndex)
BOOL WINAPI ImageList_BeginDrag(HIMAGELIST himlTrack, INT iTrack, INT dxHotspot, INT dyHotspot)
static HRESULT WINAPI ImageListImpl_Remove(IImageList2 *iface, int i)
INT WINAPI ImageList_GetImageCount(HIMAGELIST himl)
static HRESULT WINAPI ImageListImpl_Initialize(IImageList2 *iface, INT cx, INT cy, UINT flags, INT initial, INT grow)
static HRESULT WINAPI ImageListImpl_SetDragCursorImage(IImageList2 *iface, IUnknown *punk, int iDrag, int dxHotspot, int dyHotspot)
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
BOOL WINAPI ImageList_SetImageCount(HIMAGELIST himl, UINT iImageCount)
static HRESULT WINAPI ImageListImpl_GetCallback(IImageList2 *iface, REFIID riid, void **ppv)
static HRESULT WINAPI ImageListImpl_SetIconSize(IImageList2 *iface, int cx, int cy)
BOOL WINAPI ImageList_DragShowNolock(BOOL bShow)
static HRESULT WINAPI ImageListImpl_SetCallback(IImageList2 *iface, IUnknown *callback)
static HRESULT WINAPI ImageListImpl_ReplaceFromImageList(IImageList2 *iface, INT i, IImageList *imagelist, INT src, IUnknown *unk, DWORD flags)
static HRESULT WINAPI ImageListImpl_PreloadImages(IImageList2 *iface, IMAGELISTDRAWPARAMS *params)
BOOL WINAPI ImageList_GetIconSize(HIMAGELIST himl, INT *cx, INT *cy)
static HIMAGELIST impl_from_IImageList2(IImageList2 *iface)
static int get_dib_image_size(const BITMAPINFO *info)
static HRESULT ImageListImpl_CreateInstance(const IUnknown *pUnkOuter, REFIID iid, void **ppv)
static const IImageList2Vtbl ImageListImpl_Vtbl
DWORD WINAPI ImageList_GetFlags(HIMAGELIST himl)
BOOL WINAPI ImageList_SetDragCursorImage(HIMAGELIST himlDrag, INT iDrag, INT dxHotspot, INT dyHotspot)
HIMAGELIST WINAPI ImageList_Read(IStream *pstm)
static ULONG WINAPI ImageListImpl_AddRef(IImageList2 *iface)
#define HeapFree(x, y, z)
#define MultiByteToWideChar
#define __EXCEPT_PAGE_FAULT
static void cleanup(void)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
GLint GLint GLint GLint GLint x
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
HRESULT ReplaceIcon([in] int i, [in] HICON hicon, [out] int *pi)
HRESULT GetImageInfo([in] int i, [out] IMAGEINFO *pImageInfo)
HRESULT GetBkColor([out] COLORREF *pclr)
HRESULT GetIcon([in] int i, [in] UINT flags, [out] HICON *picon)
HRESULT Draw([in] IMAGELISTDRAWPARAMS *pimldp)
HRESULT Add([in] HBITMAP hbmImage, [in] HBITMAP hbmMask, [out] int *pi)
HRESULT Replace([in] int i, [in] HBITMAP hbmImage, [in] HBITMAP hbmMask)
HRESULT SetImageCount([in] UINT uNewCount)
HRESULT GetIconSize([out] int *cx, [out] int *cy)
HRESULT SetIconSize([in] int cx, [in] int cy)
HRESULT Clone([in] REFIID riid, [out] PVOID *ppv)
HRESULT SetBkColor([in] COLORREF clrBk, [out] COLORREF *pclr)
HRESULT AddMasked([in] HBITMAP hbmImage, [in] COLORREF crMask, [out] int *pi)
HRESULT Merge([in] int i1, [in] IUnknown *punk2, [in] int i2, [in] int dx, [in] int dy, [out] REFIID riid, [out] PVOID *ppv)
HRESULT BeginDrag([in] int iTrack, [in] int dxHotspot, [in] int dyHotspot)
HRESULT GetImageCount([out] int *pi)
HRESULT Copy([in] int iDst, [in] IUnknown *punkSrc, [in] int iSrc, [in] UINT uFlags)
HRESULT Remove([in] int i)
HRESULT SetOverlayImage([in] int iImage, [in] int iOverlay)
#define memcpy(s1, s2, n)
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
static IPrintDialogCallback callback
_Out_opt_ int _Out_opt_ int * cy
_In_ int _Out_ IMAGEINFO * pImageInfo
#define ImageList_AddIcon(himl, hicon)
#define ILD_PRESERVEALPHA
_Out_opt_ POINT * pptHotspot
#define IsEqualIID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2)
INT nOvlIdx[MAX_OVERLAYIMAGE]
IImageList2 IImageList2_iface
BITMAPINFOHEADER bmiHeader
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
UINT WINAPI GetDIBColorTable(HDC hDC, UINT iStartIndex, UINT cEntries, RGBQUAD *pColors)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define CLASS_E_NOAGGREGATION
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
struct tagBITMAPFILEHEADER BITMAPFILEHEADER
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
COLORREF WINAPI GetTextColor(_In_ HDC)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI StretchBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
COLORREF WINAPI GetBkColor(_In_ HDC)
_In_ UINT _In_ UINT cEntries
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
UINT WINAPI SetDIBColorTable(_In_ HDC hdc, _In_ UINT iStart, _In_ UINT cEntries, _In_reads_(cEntries) const RGBQUAD *prgbq)
COLORREF WINAPI GetNearestColor(_In_ HDC, _In_ COLORREF)
struct tagBITMAPFILEHEADER * LPBITMAPFILEHEADER
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
DWORD WINAPI GetSysColor(_In_ int)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
#define LR_COPYFROMRESOURCE
#define IS_INTRESOURCE(i)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
HANDLE WINAPI CopyImage(_In_ HANDLE, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
HDC WINAPI GetDC(_In_opt_ HWND)
#define DCX_LOCKWINDOWUPDATE
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI DestroyIcon(_In_ HICON)