IImageList2::Replace2 method (commoncontrols.h)
Replaces an image in an image list.
Syntax
HRESULT Replace2(
[in] int i,
[in] HBITMAP hbmImage,
[in, optional] HBITMAP hbmMask,
[in, optional] IUnknown *punk,
[in] DWORD dwFlags
);
Parameters
[in] i
Type: int
The index of the image to replace.
[in] hbmImage
Type: HBITMAP
A handle to the bitmap that contains the image.
[in, optional] hbmMask
Type: HBITMAP
A handle to the bitmap that contains the mask. If no mask is used with the image list, this parameter is ignored.
[in, optional] punk
Type: IUnknown*
A pointer to the IUnknown interface.
[in] dwFlags
Type: DWORD
Specifies how the mask is applied to the image as one or a bitwise combination of the following decoration flags.
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) |