IImageList::Merge method (commoncontrols.h)
Creates a new image by combining two existing images. This method also creates a new image list in which to store the image.
Syntax
HRESULT Merge(
[in] int i1,
[in] IUnknown *punk2,
[in] int i2,
[in] int dx,
[in] int dy,
[out] REFIID riid,
[out] void **ppv
);
Parameters
[in] i1
Type: int
A value of type int that contains the index of the first existing image.
[in] punk2
Type: IUnknown*
A pointer to the IUnknown interface of the image list that contains the second image.
[in] i2
Type: int
A value of type int that contains the index of the second existing image.
[in] dx
Type: int
A value of type int that contains the x-component of the offset of the second image relative to the first image.
[in] dy
Type: int
A value of type int that contains the y-component of the offset of the second image relative to the first image.
[out] riid
Type: REFIID
An IID of the interface for the new image list.
[out] ppv
Type: PVOID*
A raw pointer to the interface for the new image list.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The new image consists of the second image drawn transparently over the first. The mask for the new image is obtained by combining the masks of the two existing images with the bitwise OR operator.
To use IImageList::Merge, 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) |