comctl32: Implement GetImageRect, Get/SetIconSize, Get/SetBkColor.

This commit is contained in:
Owen Rudge 2009-11-16 13:27:21 -06:00 committed by Alexandre Julliard
parent 9adc1b8fd6
commit 2e9a6e96e3

View File

@ -3162,22 +3162,30 @@ static HRESULT WINAPI ImageListImpl_Clone(IImageList *iface, REFIID riid,
static HRESULT WINAPI ImageListImpl_GetImageRect(IImageList *iface, int i, static HRESULT WINAPI ImageListImpl_GetImageRect(IImageList *iface, int i,
RECT *prc) RECT *prc)
{ {
FIXME("STUB: %p %d %p\n", iface, i, prc); HIMAGELIST This = (HIMAGELIST) iface;
return E_NOTIMPL; IMAGEINFO info;
if (!prc)
return E_FAIL;
if (!ImageList_GetImageInfo(This, i, &info))
return E_FAIL;
return CopyRect(prc, &info.rcImage) ? S_OK : E_FAIL;
} }
static HRESULT WINAPI ImageListImpl_GetIconSize(IImageList *iface, int *cx, static HRESULT WINAPI ImageListImpl_GetIconSize(IImageList *iface, int *cx,
int *cy) int *cy)
{ {
FIXME("STUB: %p %p %p\n", iface, cx, cy); HIMAGELIST This = (HIMAGELIST) iface;
return E_NOTIMPL;
return ImageList_GetIconSize(This, cx, cy) ? S_OK : E_FAIL;
} }
static HRESULT WINAPI ImageListImpl_SetIconSize(IImageList *iface, int cx, static HRESULT WINAPI ImageListImpl_SetIconSize(IImageList *iface, int cx,
int cy) int cy)
{ {
FIXME("STUB: %p %d %d\n", iface, cx, cy); return ImageList_SetIconSize((HIMAGELIST) iface, cx, cy) ? S_OK : E_FAIL;
return E_NOTIMPL;
} }
static HRESULT WINAPI ImageListImpl_GetImageCount(IImageList *iface, int *pi) static HRESULT WINAPI ImageListImpl_GetImageCount(IImageList *iface, int *pi)
@ -3198,14 +3206,20 @@ static HRESULT WINAPI ImageListImpl_SetImageCount(IImageList *iface,
static HRESULT WINAPI ImageListImpl_SetBkColor(IImageList *iface, COLORREF clrBk, static HRESULT WINAPI ImageListImpl_SetBkColor(IImageList *iface, COLORREF clrBk,
COLORREF *pclr) COLORREF *pclr)
{ {
FIXME("STUB: %p %x %p\n", iface, clrBk, pclr); if (!pclr)
return E_NOTIMPL; return E_FAIL;
*pclr = ImageList_SetBkColor((HIMAGELIST) iface, clrBk);
return *pclr == CLR_NONE ? E_FAIL : S_OK;
} }
static HRESULT WINAPI ImageListImpl_GetBkColor(IImageList *iface, COLORREF *pclr) static HRESULT WINAPI ImageListImpl_GetBkColor(IImageList *iface, COLORREF *pclr)
{ {
FIXME("STUB: %p %p\n", iface, pclr); if (!pclr)
return E_NOTIMPL; return E_FAIL;
*pclr = ImageList_GetBkColor((HIMAGELIST) iface);
return S_OK;
} }
static HRESULT WINAPI ImageListImpl_BeginDrag(IImageList *iface, int iTrack, static HRESULT WINAPI ImageListImpl_BeginDrag(IImageList *iface, int iTrack,