mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:54:13 +00:00
ole32: Add support for rendering HENHMETAFILE clipboard objects.
This commit is contained in:
parent
a30624143a
commit
51385a98cc
1 changed files with 28 additions and 0 deletions
|
@ -744,6 +744,30 @@ static HRESULT get_data_from_global(IDataObject *data, FORMATETC *fmt, HGLOBAL *
|
|||
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
|
||||
*
|
||||
|
@ -773,6 +797,10 @@ static HRESULT render_format(IDataObject *data, LPFORMATETC fmt)
|
|||
{
|
||||
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
|
||||
{
|
||||
FIXME("Unhandled tymed %x\n", fmt->tymed);
|
||||
|
|
Loading…
Reference in a new issue