IShellImageData::Draw method

Draws a decoded image.

Syntax


HRESULT Draw(
  [in]  HDC hdc,
  [in]  LPRECT prcDest,
  [in]  LPRECT prcSrc
);

Parameters

hdc [in]

Type: HDC

The handle of the image.

prcDest [in]

Type: LPRECT

A pointer to a RECT, measured in pixels, that specifies the bounds of the rendered image. The portion of the image specified by prcSrc is scaled to fill the rectangle specified by prcDest.

prcSrc [in]

Type: LPRECT

A pointer to a RECT that specifies the portion of the image to be drawn.

Return value

Type: HRESULT

Returns S_OK if successful or an error value otherwise, including the following:

Return codeDescription
E_FAIL

The image was not previously decoded, the call to IShellImageData::Decode failed, or hdc is NULL. Other internal calls also can cause this error to be returned.

E_INVALIDARG

The prcDest parameter is NULL.

E_ABORT

The process was terminated by the calling application through a registered instance of IShellImageDataAbort.

 

Remarks

If prcSrc is NULL, nothing is drawn and the method returns S_OK.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Shimgdata.h

IDL

Shimgdata.idl

DLL

Shell32.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.