Implemented OleDraw.

This commit is contained in:
Troy Rollo 2003-06-27 04:03:40 +00:00 committed by Alexandre Julliard
parent 996dc01432
commit 72659c998f
2 changed files with 40 additions and 1 deletions

View file

@ -2258,6 +2258,45 @@ HGLOBAL16 WINAPI OleMetaFilePictFromIconAndLabel16(
return hmf;
}
/******************************************************************************
* OleDraw (OLE32.101)
*
* The operation of this function is documented literally in the WinAPI
* documentation to involve a QueryInterface for the IViewObject interface,
* followed by a call to IViewObject::Draw.
*/
HRESULT WINAPI OleDraw(
IUnknown *pUnk,
DWORD dwAspect,
HDC hdcDraw,
LPCRECT lprcBounds)
{
HRESULT hres;
IViewObject *viewobject;
hres = IUnknown_QueryInterface(pUnk,
&IID_IViewObject,
(void**)&viewobject);
if (SUCCEEDED(hres))
{
RECTL rectl;
rectl.left = lprcBounds->left;
rectl.right = lprcBounds->right;
rectl.top = lprcBounds->top;
rectl.bottom = lprcBounds->bottom;
hres = IViewObject_Draw(viewobject, dwAspect, -1, 0, 0, 0, hdcDraw, &rectl, 0, 0, 0);
IViewObject_Release(viewobject);
return hres;
}
else
{
return DV_E_NOIVIEWOBJECT;
}
}
/******************************************************************************
* DllDebugObjectRPCHook (OLE32.62)
* turns on and off internal debugging, pointer is only used on macintosh

View file

@ -98,7 +98,7 @@
98 stdcall OleCreateStaticFromData(ptr ptr long ptr ptr ptr ptr)
99 stdcall OleDestroyMenuDescriptor(long)
100 stdcall OleDoAutoConvert(ptr ptr)
101 stub OleDraw
101 stdcall OleDraw(ptr long long ptr)
102 stdcall OleDuplicateData(long long long)
103 stdcall OleFlushClipboard()
104 stdcall OleGetAutoConvert(ptr ptr)