[PATCH 3/4] oleaut32: IPicture::set_hPal() supports only bitmaps.
Dmitry Timoshkov
dmitry at baikal.ru
Fri Jul 6 03:09:59 CDT 2018
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/oleaut32/olepicture.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 401d940262..b58fa9f1a4 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -742,10 +742,18 @@ static HRESULT WINAPI OLEPictureImpl_Render(IPicture *iface, HDC hdc,
static HRESULT WINAPI OLEPictureImpl_set_hPal(IPicture *iface,
OLE_HANDLE hpal)
{
- OLEPictureImpl *This = impl_from_IPicture(iface);
- FIXME("(%p)->(%08x): stub\n", This, hpal);
- OLEPicture_SendNotify(This,DISPID_PICT_HPAL);
- return E_NOTIMPL;
+ OLEPictureImpl *This = impl_from_IPicture(iface);
+
+ TRACE("(%p)->(%08x)\n", This, hpal);
+
+ if (This->desc.picType == PICTYPE_BITMAP)
+ {
+ This->desc.u.bmp.hpal = (HPALETTE)hpal;
+ OLEPicture_SendNotify(This,DISPID_PICT_HPAL);
+ return S_OK;
+ }
+
+ return E_FAIL;
}
/************************************************************************
--
2.17.1
More information about the wine-devel
mailing list