IImageList::Draw method (commoncontrols.h)

Draws an image list item in the specified device context.

Syntax

HRESULT Draw(
  [in] IMAGELISTDRAWPARAMS *pimldp
);

Parameters

[in] pimldp

Type: IMAGELISTDRAWPARAMS*

A pointer to an IMAGELISTDRAWPARAMS structure that contains the drawing parameters.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Overlay images draw transparently over the primary image specified in the i parameter of IMAGELISTDRAWPARAMS. You specify an overlay image in the fStyle, parameter of IMAGELISTDRAWPARAMS using the INDEXTOOVERLAYMASK macro to shift the one-based index of the overlay image. Use the OR operator to combine the macro's return value with the drawing style flags specified in fStyle. You must first specify this image as an overlay image by using IImageList::SetOverlayImage.

To use IImageList::Draw, specify Comctl32.dll version 6 in the manifest. For more information on manifests, see Enabling Visual Styles.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commoncontrols.h
DLL Comctl32.dll (version 6.0 or later)