Επεξεργασία

Κοινή χρήση μέσω


IShellImageData::Draw method (shimgdata.h)

Draws a decoded image.

Syntax

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

Parameters

[in] hdc

Type: HDC

The handle of the image.

[in] prcDest

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.

[in] prcSrc

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 code Description
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

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shimgdata.h
DLL Shell32.dll