Renders (draws) a specified portion of the picture defined by the offset (xSrc,ySrc) of the source picture and the dimensions to copy (cxSrc,xySrc). This picture is rendered onto the specified device context, positioned at the point (x,y), and scaled to the dimensions (cx,cy). The prcWBounds parameter specifies the position of this rendering if the destination device context is itself a metafile. Such information is necessary to place one metafile in another. For more information, see the prcWBounds parameter of IViewObject2::Draw.
HRESULT Render(
HDC hdc , |
//Handle of device context on which to render the image |
long x , |
//Horizontal position of image in hdc |
long y , |
//Vertical position of image in hdc |
long cx , |
//Horizontal dimension of destination rectangle |
long cy , |
//Vertical dimension of destination rectangle |
OLE_XPOS_HIMETRIC xSrc , |
//Horizontal offset in source picture |
OLE_YPOS_HIMETRIC ySrc , |
//Vertical offset in source picture |
OLE_XSIZE_HIMETRIC cxSrc , |
//Amount to copy horizontally in source picture |
OLE_YSIZE_HIMETRIC cySrc , |
//Amount to copy vertically in source picture |
LPCRECT prcWBounds |
//Pointer to position of destination for a metafile hdc |
); |
Parameters
Return Values
This method supports the standard return values E_FAIL, E_INVALIDARG, and E_OUTOFMEMORY, as well as the following: