Commit 69a93593 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

- first 'dummy' implementation of ImageList_Read

parent 70e0969e
......@@ -35,6 +35,7 @@
#include "imagelist.h"
#include "commctrl.h"
#include "debugtools.h"
#include "winerror.h"
DEFAULT_DEBUG_CHANNEL(imagelist)
......@@ -1904,10 +1905,23 @@ ImageList_Merge (HIMAGELIST himl1, INT i1, HIMAGELIST himl2, INT i2,
HIMAGELIST WINAPI ImageList_Read (LPSTREAM pstm)
{
FIXME("empty stub!\n");
HRESULT errCode;
ULONG ulRead;
ILHEAD ilHead;
HIMAGELIST himl;
FIXME("empty stub!\n");
errCode = IStream_Read (pstm, &ilHead, sizeof(ILHEAD), &ulRead);
if (errCode != S_OK)
return NULL;
FIXME("Magic: 0x%x\n", ilHead.usMagic);
himl = ImageList_Create (32, 32, ILD_NORMAL, 2, 2);
return himl;
}
......@@ -2390,13 +2404,13 @@ ImageList_SetImageCount (HIMAGELIST himl, INT iImageCount)
/* copy images */
BitBlt (hdcBitmap, 0, 0, nCopyCount * himl->cx, himl->cy,
hdcImageList, 0, 0, SRCCOPY);
#if 0
/* delete 'empty' image space */
SetBkColor (hdcBitmap, RGB(255, 255, 255));
SetTextColor (hdcBitmap, RGB(0, 0, 0));
PatBlt (hdcBitmap, nCopyCount * himl->cx, 0,
(nNewCount - nCopyCount) * himl->cx, himl->cy, BLACKNESS);
#endif
DeleteObject (himl->hbmImage);
himl->hbmImage = hbmNewBitmap;
}
......@@ -2415,13 +2429,13 @@ ImageList_SetImageCount (HIMAGELIST himl, INT iImageCount)
/* copy images */
BitBlt (hdcBitmap, 0, 0, nCopyCount * himl->cx, himl->cy,
hdcImageList, 0, 0, SRCCOPY);
#if 0
/* delete 'empty' image space */
SetBkColor (hdcBitmap, RGB(255, 255, 255));
SetTextColor (hdcBitmap, RGB(0, 0, 0));
PatBlt (hdcBitmap, nCopyCount * himl->cx, 0,
(nNewCount - nCopyCount) * himl->cx, himl->cy, BLACKNESS);
#endif
DeleteObject (himl->hbmMask);
himl->hbmMask = hbmNewBitmap;
}
......
......@@ -30,5 +30,20 @@ struct _IMAGELIST
typedef struct _IMAGELIST *HIMAGELIST;
/* header used by ImageList_Read() and ImageList_Write() */
typedef struct _ILHEAD
{
USHORT usMagic;
USHORT usParam1;
INT Param2;
INT Param3;
INT Param4;
INT Param5;
INT Param6;
INT Param7;
} ILHEAD;
#endif /* __WINE_IMAGELIST_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment