Commit 51385a98 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Add support for rendering HENHMETAFILE clipboard objects.

parent a3062414
...@@ -744,6 +744,30 @@ static HRESULT get_data_from_global(IDataObject *data, FORMATETC *fmt, HGLOBAL * ...@@ -744,6 +744,30 @@ static HRESULT get_data_from_global(IDataObject *data, FORMATETC *fmt, HGLOBAL *
return hr; return hr;
} }
static HRESULT get_data_from_enhmetafile(IDataObject *data, FORMATETC *fmt, HGLOBAL *mem)
{
HENHMETAFILE copy;
HRESULT hr;
FORMATETC mem_fmt;
STGMEDIUM med;
*mem = NULL;
mem_fmt = *fmt;
mem_fmt.tymed = TYMED_ENHMF;
hr = IDataObject_GetData(data, &mem_fmt, &med);
if(FAILED(hr)) return hr;
copy = CopyEnhMetaFileW(med.u.hEnhMetaFile, NULL);
if(copy) *mem = (HGLOBAL)copy;
else hr = E_FAIL;
ReleaseStgMedium(&med);
return hr;
}
/*********************************************************************** /***********************************************************************
* render_format * render_format
* *
...@@ -773,6 +797,10 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt) ...@@ -773,6 +797,10 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt)
{ {
hr = get_data_from_global(data, fmt, &clip_data); hr = get_data_from_global(data, fmt, &clip_data);
} }
else if(fmt->tymed & TYMED_ENHMF)
{
hr = get_data_from_enhmetafile(data, fmt, &clip_data);
}
else else
{ {
FIXME("Unhandled tymed %x\n", fmt->tymed); FIXME("Unhandled tymed %x\n", fmt->tymed);
......
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