Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Copies images from a given image list.
Syntax
HRESULT Copy(
  [in] int      iDst,
  [in] IUnknown *punkSrc,
  [in] int      iSrc,
  [in] UINT     uFlags
);
Parameters
[in] iDst
Type: int
A value of type int that contains the zero-based index of the destination image for the copy operation.
[in] punkSrc
Type: IUnknown*
A pointer to the IUnknown interface for the source image list.
[in] iSrc
Type: int
A value of type int that contains the zero-based index of the source image for the copy operation.
[in] uFlags
Type: UINT
A value that specifies the type of copy operation to be made.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The uFlags parameter can have the following values.
| Value | Description | 
|---|---|
| ILCF_MOVE | The source image is copied to the destination image's index. This operation results in multiple instances of a given image. | 
| ILCF_SWAP | The source and destination images exchange positions within the image list. | 
To use IImageList::Copy, 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) |