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.
BOOL Copy( int iDst**, int** iSrc**, UINT** uFlags = ILCF_MOVE );
BOOL Copy( int iDst**, CImageList*** pSrc**, int** iSrc**, UINT** uFlags = ILCF_MOVE );
Return Value
Nonzero if successful; otherwise zero.
Parameters
iDst
The zero-based index of the image to be used as the destination of the copy operation.
iSrc
The zero-based index of the image to be used as the source of the copy operation.
uFlags
The bit flag value that specifies the type of copy operation to be made. This parameter can be one of the following values:
Value | Meaning |
ILCF_MOVE | The source image is copied to the destination image's index. This operation results in multiple instances of a given image. ILCF_MOVE is the default. |
ILCF_SWAP | The source and destination images exchange positions within the image list. |
pSrc
A pointer to a CImageList object that is the target of the copy operation.
Remarks
This member function implements the behavior of the Win32 function , as described in the Platform SDK.
Example
// The pointer to my image list.
extern CImageList* pmyImageList;
// The pointer to another image list.
extern CImageList* pmyImageList2;
// Copy the first image from pmyImageList2 and make it
// the first image of pmyImageList.
pmyImageList->Copy(0, pmyImageList2, 0, ILCF_MOVE);
// Recopy the new image of pmyImageList to make it also
// the last image in pmyImageList.
// Recopy the image to make it also the last image in pmyImageList.
pmyImageList->Copy(pmyImageList->GetImageCount()-1,
(UINT) 0, ILCF_MOVE);