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
120#define IMAGELIST_MAGIC 0x53414D58
122#define IMAGELIST_MAGIC_DESTROYED 0x44454144
123#define IMAGELIST_VERSION 0x101
125#define WinVerMajor() LOBYTE(GetVersion())
128#define ILC_PUBLICFLAGS ( 0xFFFFFFFF )
129#define ILC_COLORMASK 0xFE
210 return ((
width *
bpp + 31) >> 3) & ~3;
216 *
abs(
info->bmiHeader.biHeight );
250 int mask_stride = (
info->bmiHeader.biWidth + 31) / 32 * 4;
259 for (
i = 0;
i <
height && !has_alpha;
i++)
261 if ((has_alpha = ((
bits[
i *
stride +
j] & 0xff000000) != 0)))
break;
267 if (!mask_info || !((mask_bits[
i * mask_stride +
j / 8] << (
j % 8)) & 0x80))
281 mask_bits[
i * mask_stride +
j / 8] &= ~(0x80 >> (
j % 8));
283 mask_bits[
i * mask_stride +
j / 8] |= 0x80 >> (
j % 8);
309 if (bm.bmBitsPixel != 32)
return FALSE;
312 mask_width = (bm.bmWidth + 31) / 32 * 4;
316 info->bmiHeader.biWidth = bm.bmWidth;
318 info->bmiHeader.biPlanes = 1;
319 info->bmiHeader.biBitCount = 32;
321 info->bmiHeader.biSizeImage = bm.bmWidth *
height * 4;
322 info->bmiHeader.biXPelsPerMeter = 0;
323 info->bmiHeader.biYPelsPerMeter = 0;
324 info->bmiHeader.biClrUsed = 0;
325 info->bmiHeader.biClrImportant = 0;
387 TRACE(
"Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n",
himl, sz.
cx, sz.
cy, nNewCount);
392 if (hbmNewBitmap == 0)
393 ERR(
"creating new image bitmap (x=%d y=%d)!\n", sz.
cx, sz.
cy);
410 if (hbmNewBitmap == 0)
411 ERR(
"creating new mask bitmap!\n");
461 INT nFirstIndex, nImageCount,
i;
465 TRACE(
"himl=%p hbmimage=%p hbmmask=%p\n",
himl, hbmImage, hbmMask);
472 TRACE(
"himl %p, cCurImage %d, cMaxImage %d, cGrow %d, cx %d, cy %d\n",
477 TRACE(
"%p has %d images (%d x %d) bpp %d\n", hbmImage, nImageCount,
bmp.bmWidth,
bmp.bmHeight,
504 for (
i=0;
i<nImageCount;
i++)
549#undef ImageList_AddIcon
614 if (
bmp.bmBitsPixel > 8)
649 INT dxHotspot,
INT dyHotspot)
654 TRACE(
"(himlTrack=%p iTrack=%d dx=%d dy=%d)\n", himlTrack, iTrack,
655 dxHotspot, dyHotspot);
671 WARN(
"Error creating drag image list!\n");
721 TRACE(
"himlDst=%p iDst=%d himlSrc=%p iSrc=%d\n", himlDst, iDst, himlSrc, iSrc);
725 if ((iDst < 0) || (iDst >= himlDst->
cCurImage))
727 if ((iSrc < 0) || (iSrc >= himlSrc->
cCurImage))
736 HBITMAP hbmTempImage, hbmTempMask;
755 himlDst->
hdcMask, ptDst.
x, ptDst.
y, himlDst->
cx, himlDst->
cy,
765 himlSrc->
hdcMask, ptSrc.
x, ptSrc.
y, himlSrc->
cx, himlSrc->
cy,
789 himlSrc->
hdcMask, ptSrc.
x, ptSrc.
y, himlSrc->
cx, himlSrc->
cy,
821 static const WORD aBitBlend25[] =
822 {0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00};
824 static const WORD aBitBlend50[] =
825 {0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA};
836 cGrow = (
WORD)((
max( cGrow, 1 ) + 3) & ~3);
841 WARN(
"grow %d too large, limiting to 256\n", cGrow );
896 ERR(
"Error creating mask bitmap!\n");
978 TRACE(
"(hwnd=%p x=%d y=%d)\n", hwndLock,
x,
y);
1021 FIXME(
"DragLeave hWnd != DragEnter hWnd\n");
1055 imldp.
cbSize =
sizeof(imldp);
1101 INT origNewX, origNewY;
1102 INT origOldX, origOldY;
1103 INT origRegX, origRegY;
1104 INT sizeRegX, sizeRegY;
1112 origRegX =
min(origNewX, origOldX);
1113 origRegY =
min(origNewY, origOldY);
1127 BitBlt(hdcOffScreen, 0, 0, sizeRegX, sizeRegY, hdcDrag,
1130 BitBlt(hdcOffScreen, origOldX - origRegX, origOldY - origRegY,
1135 hdcOffScreen, origNewX - origRegX, origNewY - origRegY,
SRCCOPY);
1138 origNewY - origRegY);
1140 BitBlt(hdcDrag, origRegX, origRegY, sizeRegX, sizeRegY,
1180 TRACE(
"bShow=0x%X!\n", bShow);
1289 imldp.
cbSize =
sizeof(imldp);
1297 imldp.
rgbBk = rgbBk;
1298 imldp.
rgbFg = rgbFg;
1316 void *
bits, *mask_bits;
1323 info->bmiHeader.biWidth =
cx;
1324 info->bmiHeader.biHeight =
cy;
1325 info->bmiHeader.biPlanes = 1;
1326 info->bmiHeader.biBitCount = 32;
1328 info->bmiHeader.biSizeImage =
cx *
cy * 4;
1329 info->bmiHeader.biXPelsPerMeter = 0;
1330 info->bmiHeader.biYPelsPerMeter = 0;
1331 info->bmiHeader.biClrUsed = 0;
1332 info->bmiHeader.biClrImportant = 0;
1342 TRACE(
"BitBlt failed\n");
1358 *
ptr = ((*
ptr & 0xff000000) |
1359 ((((*
ptr & 0x00ff0000) * 3 + (
r << 16)) / 4) & 0x00ff0000) |
1360 ((((*
ptr & 0x0000ff00) * 3 + (
g << 8)) / 4) & 0x0000ff00) |
1361 ((((*
ptr & 0x000000ff) * 3 + (
b << 0)) / 4) & 0x000000ff));
1366 *
ptr = ((*
ptr & 0xff000000) |
1367 ((((*
ptr & 0x00ff0000) + (
r << 16)) / 2) & 0x00ff0000) |
1368 ((((*
ptr & 0x0000ff00) + (
g << 8)) / 2) & 0x0000ff00) |
1369 ((((*
ptr & 0x000000ff) + (
b << 0)) / 2) & 0x000000ff));
1379 *
ptr = ((*
ptr & 0xff000000) |
1380 (((*
ptr & 0x00ff0000) *
alpha / 255) & 0x00ff0000) |
1381 (((*
ptr & 0x0000ff00) *
alpha / 255) & 0x0000ff00) |
1382 (((*
ptr & 0x000000ff) *
alpha / 255)));
1389 info->bmiHeader.biBitCount = 1;
1391 info->bmiColors[0].rgbRed = 0;
1392 info->bmiColors[0].rgbGreen = 0;
1393 info->bmiColors[0].rgbBlue = 0;
1394 info->bmiColors[0].rgbReserved = 0;
1395 info->bmiColors[1].rgbRed = 0xff;
1396 info->bmiColors[1].rgbGreen = 0xff;
1397 info->bmiColors[1].rgbBlue = 0xff;
1398 info->bmiColors[1].rgbReserved = 0;
1424 else *
ptr |= 0xff000000;
1427 ret =
GdiAlphaBlend( dest_dc, dest_x, dest_y,
cx,
cy,
hdc, 0, 0,
cx,
cy,
func );
1440 HDC *hdcImageListDC,
HDC *hdcMaskListDC)
1455 info->bmiHeader.biWidth =
cx;
1456 info->bmiHeader.biHeight =
cy;
1457 info->bmiHeader.biPlanes = 1;
1458 info->bmiHeader.biBitCount = 32;
1460 info->bmiHeader.biSizeImage =
cx *
cy * 4;
1461 info->bmiHeader.biXPelsPerMeter = 0;
1462 info->bmiHeader.biYPelsPerMeter = 0;
1463 info->bmiHeader.biClrUsed = 0;
1464 info->bmiHeader.biClrImportant = 0;
1470 TRACE(
"SelectObject failed\n");
1477 TRACE(
"BitBlt failed!\n");
1488 float mixed_color = (
GetRValue(orig_color) * .30 +
1523 *hdcMaskListDC = hdcMask;
1524 *hdcImageListDC =
hdc;
1546 DWORD fState, dwRop;
1549 HDC hImageDC, hImageListDC, hMaskListDC;
1550 HBITMAP hImageBmp, hOldImageBmp, hBlendMaskBmp;
1551 BOOL bIsTransparent, bBlend, bResult =
FALSE, bMask;
1575 bIsTransparent =
TRUE;
1577 bIsTransparent =
TRUE;
1581 TRACE(
"himl(%p) hbmMask(%p) iImage(%d) x(%d) y(%d) cx(%d) cy(%d)\n",
1594 if (!hImageListDC || !hImageDC || !hImageBmp ||
1595 (bBlend && !hBlendMaskBmp) || (
himl->
hbmMask && !hMaskListDC))
1606 oldImageBk =
SetBkColor( hImageDC,
RGB( 0xff, 0xff, 0xff ) );
1615 if (saturate_image(
himl, pimldp->
hdcDst, pimldp->
x, pimldp->
y,
1617 &hdcSaturated, &hdcSaturatedMask))
1619 hImageListDC = hdcSaturated;
1620 hMaskListDC = hdcSaturatedMask;
1630 if (!bMask && (has_alpha || (fState &
ILS_ALPHA)))
1637 blend_col = pimldp->
rgbFg;
1643 func.BlendFlags = 0;
1657 colour = pimldp->
rgbBk;
1664 alpha_blend_image(
himl, hImageListDC, hMaskListDC, hImageDC, 0, 0,
pt.x,
pt.y,
cx,
cy,
func, fStyle, blend_col );
1666 alpha_blend_image(
himl, hImageDC, 0, 0,
pt.x,
pt.y,
cx,
cy,
func, fStyle, blend_col );
1682 if( bIsTransparent )
1697 if( !bIsTransparent )
1699 colour = pimldp->
rgbBk;
1722 HDC hBlendMaskDC = hImageListDC;
1726 hOldBitmap =
SelectObject(hBlendMaskDC, hBlendMaskBmp);
1734 BitBlt(hBlendMaskDC, 0, 0,
cx,
cy, hMaskListDC,
pt.x,
pt.y, 0x220326);
1742 BitBlt (hImageDC, 0, 0,
cx,
cy, hBlendMaskDC, 0, 0, 0xB8074A);
1794 if (hdcSaturatedMask)
1824 ERR(
"Invalid image list handle!\n");
1956 if(!is_valid2(
himl))
2235 WARN(
"Couldn't load image\n");
2255 cx =
dib.dsBm.bmHeight;
2258 nImageCount =
dib.dsBm.bmWidth /
cx;
2272 if (nImageCount < 0)
2336 INT xOff1, yOff1, xOff2, yOff2;
2340 TRACE(
"(himl1=%p i1=%d himl2=%p i2=%d dx=%d dy=%d)\n", himl1, i1, himl2,
2347 cxDst =
max (himl1->
cx,
dx + himl2->
cx);
2352 cxDst =
max (himl2->
cx, himl1->
cx -
dx);
2357 cxDst =
max (himl1->
cx, himl2->
cx);
2363 cyDst =
max (himl1->
cy,
dy + himl2->
cy);
2368 cyDst =
max (himl2->
cy, himl1->
cy -
dy);
2373 cyDst =
max (himl1->
cy, himl2->
cy);
2390 if (i1 >= 0 && i1 < himl1->cCurImage)
2392 if (i2 >= 0 && i2 < himl2->cCurImage)
2405 if (i1 >= 0 && i1 < himl1->cCurImage)
2407 if (i2 >= 0 && i2 < himl2->cCurImage)
2421 int bitsperpixel, palspace;
2424 if (
FAILED(IStream_Read ( pstm, &bmfh,
sizeof(bmfh),
NULL)))
2427 if (bmfh.
bfType != ((
'M'<<8)|
'B'))
2436 TRACE(
"width %u, height %u, planes %u, bpp %u\n",
2441 if (bitsperpixel<=8)
2442 palspace = (1<<bitsperpixel)*
sizeof(
RGBQUAD);
2500 void *image_bits, *mask_bits =
NULL;
2505 TRACE(
"%p\n", pstm);
2509 if (ilHead.
usMagic != ((
'L' << 8) |
'I'))
2512 if (ilHead.
usVersion != IMAGELIST_VERSION &&
2520 TRACE(
"cx %u, cy %u, flags 0x%04x, cCurImage %u, cMaxImage %u\n",
2532 if (!(image_bits =
read_bitmap(pstm, image_info)))
2534 WARN(
"failed to read bitmap from stream\n");
2541 WARN(
"failed to read mask bitmap from stream\n");
2545 else mask_info =
NULL;
2550 BYTE *mask_ptr = mask_bits;
2554 int mask_step = ilHead.
usVersion != IMAGELIST_VERSION ? 4 : 8;
2576 mask_ptr +=
stride / mask_step;
2630 HBITMAP hbmNewImage, hbmNewMask;
2637 ERR(
"Invalid image list handle!\n");
2642 TRACE(
"index out of range! %d\n",
i);
2652 TRACE(
"remove all on empty ImageList!\n");
2683 TRACE(
"Remove single image! %d\n",
i);
2686 TRACE(
" - Number of images: %d / %d (Old/New)\n",
2701 TRACE(
"Pre image copy: Copy %d images\n",
i);
2713 if (i < himl->cCurImage - 1) {
2714 TRACE(
"Post image copy!\n");
2770 TRACE(
"%p %d %p %p\n",
himl,
i, hbmImage, hbmMask);
2773 ERR(
"Invalid image list handle!\n");
2778 ERR(
"Invalid image index!\n");
2850 ERR(
"invalid image list\n");
2989 INT dxHotspot,
INT dyHotspot)
2997 TRACE(
" dxH=%d dyH=%d nX=%d nY=%d\n",
3003 dxHotspot, dyHotspot);
3052 FIXME(
"(%p 0x%x 0x%x):empty stub!\n",
himl,
i, dwFilter);
3094 if (
flags & ~ILC_PUBLICFLAGS)
3104 return ChangeColorDepth(
himl);
3187 INT nNewCount, nCopyCount;
3194 nNewCount = iImageCount + 1;
3201 if (hbmNewBitmap != 0)
3214 ERR(
"Could not create new image bitmap!\n");
3221 if (hbmNewBitmap != 0)
3234 ERR(
"Could not create new mask bitmap!\n");
3280 if ((iImage!=-1) && ((iImage < 0) || (iImage >
himl->
cCurImage)))
3297 INT bitCount, sizeImage, offBits, totalSize;
3304 bitCount = bm.bmBitsPixel;
3309 totalSize += (1 << bitCount) *
sizeof(
RGBQUAD);
3310 offBits = totalSize;
3311 totalSize += sizeImage;
3313 data = heap_alloc_zero(totalSize);
3316 lpBits =
data + offBits;
3319 bmfh->
bfType = ((
'M' << 8) |
'B');
3344 TRACE(
"width %u, height %u, planes %u, bpp %u\n",
3387 ilHead.
usMagic = ((
'L' << 8) |
'I');
3396 for(
i = 0;
i < 4;
i++) {
3400 TRACE(
"cx %u, cy %u, flags 0x04%x, cCurImage %u, cMaxImage %u\n",
3433 TRACE(
"Creating DIBSection %d x %d, %d Bits per Pixel\n",
3473 TRACE(
"returning %p\n", hbmNewBitmap);
3474 return hbmNewBitmap;
3500 if(!is_valid2(
himl))
3560 IImageList2_AddRef(iface);
3569 TRACE(
"(%p) refcount=%u\n", iface,
ref);
3578 TRACE(
"(%p) refcount=%u\n", iface,
ref);
3595 This->usMagic = IMAGELIST_MAGIC_DESTROYED;
3597 This->IImageList2_iface.lpVtbl =
NULL;
3642 int iImage,
int iOverlay)
3682 old_himl = pimldp->
himl;
3683 pimldp->
himl = imgl;
3687 pimldp->
himl = old_himl;
3739 if (
FAILED(IUnknown_QueryInterface(unk_src, &IID_IImageList,
3748 IImageList_Release(
src);
3769 if (
FAILED(IUnknown_QueryInterface(punk2, &IID_IImageList,
3782 IImageList_Release(iml2);
3866 int dxHotspot,
int dyHotspot)
3895 IUnknown *punk,
int iDrag,
int dxHotspot,
int dyHotspot)
3904 if (
FAILED(IUnknown_QueryInterface(punk, &IID_IImageList,
3911 IImageList_Release(iml2);
3938 IImageList_Release(idrag);
3957 if ((iOverlay < 0) || (iOverlay >
This->cCurImage))
3962 if (
This->nOvlIdx[
i] == iOverlay)
3974 FIXME(
"(%p)->(%d %d): stub\n", iface,
cx,
cy);
4010 FIXME(
"(%p)->(%d %d %x): stub\n", iface, first_image, last_image,
flags);
4022 FIXME(
"(%p)->(%p): stub\n", iface, stats);
4028 FIXME(
"(%p)->(%d %d %d %d %d): stub\n", iface,
cx,
cy,
flags, initial, grow);
4041 FIXME(
"(%p)->(%d %p %d %p %x): stub\n", iface,
i, imagelist,
src, unk,
flags);
4099 if (!
valid &&
himl &&
himl->usMagic == IMAGELIST_MAGIC_DESTROYED)
4101 ERR(
"Imagelist no longer valid: 0x%p\n",
himl);
4158 ret = IImageList2_QueryInterface(&
This->IImageList2_iface, iid,
ppv);
4159 IImageList2_Release(&
This->IImageList2_iface);
4169#undef ImageList_ReplaceIcon
4170#undef ImageList_SetOverlayImage
4171#undef ImageList_Replace
4172#undef ImageList_AddMasked
4173#undef ImageList_Remove
4174#undef ImageList_GetIcon
4175#undef ImageList_GetImageInfo
4176#undef ImageList_Copy
4177#undef ImageList_Merge
4178#undef ImageList_Duplicate
4179#undef ImageList_GetIconSize
4180#undef ImageList_SetIconSize
4181#undef ImageList_GetImageCount
4182#undef ImageList_SetImageCount
4183#undef ImageList_SetBkColor
4184#undef ImageList_GetBkColor
4185#undef ImageList_BeginDrag
4186#undef ImageList_DrawIndirect
4206 himl->usMagic == IMAGELIST_MAGIC_DESTROYED)
4208 ERR(
"Imagelist no longer valid: 0x%p\n",
himl);
4228 hr = piml->lpVtbl->
Add(piml, hbmImage, hbmMask, &
res);
4329 pimlDst = IImageList2_from_impl(himlDst);
4330 pimlSrc = IImageList2_from_impl(himlSrc);
4331 if (!pimlDst || !pimlSrc)
4343 piml1 = IImageList2_from_impl(himl1);
4344 piml2 = IImageList2_from_impl(himl2);
4345 if (!piml1 || !piml2)
4348 hr = piml1->lpVtbl->
Merge(piml1, i1, (
IUnknown*)piml2, i2,
dx,
dy, &IID_IImageList2, (
void**)&pimlMerged);
4360 piml = IImageList2_from_impl(himlSrc);
4364 hr = piml->lpVtbl->
Clone(piml, &IID_IImageList2, (
void**)&pimlCloned);
4451 INT dxHotspot,
INT dyHotspot)
4453 IImageList2* piml = IImageList2_from_impl(himlTrack);
4468 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
GLuint GLuint GLsizei count
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
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)