IImageList2::ReplaceFromImageList method (commoncontrols.h)

Replaces an image in one image list with an image from another image list.

Syntax

HRESULT ReplaceFromImageList(
  [in]           int        i,
  [in]           IImageList *pil,
  [in]           int        iSrc,
  [in, optional] IUnknown   *punk,
  [in]           DWORD      dwFlags
);

Parameters

[in] i

Type: int

The index of the destination image in the image list. This is the image that is overwritten by the new image.

[in] pil

Type: IImageList*

A pointer to the source image list.

[in] iSrc

Type: int

The index of the source image in the image list pointed to by pil.

[in, optional] punk

Type: IUnknown*

A pointer to the IUnknown interface.

[in] dwFlags

Type: DWORD

Not used; must be 0.

Return value

Type: HRESULT

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

Requirements

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