IMAGELISTDRAWPARAMS structure (commoncontrols.h)
Contains information about an image list draw operation and is used with the IImageList::Draw function.
Syntax
typedef struct _IMAGELISTDRAWPARAMS {
DWORD cbSize;
HIMAGELIST himl;
int i;
HDC hdcDst;
int x;
int y;
int cx;
int cy;
int xBitmap;
int yBitmap;
COLORREF rgbBk;
COLORREF rgbFg;
UINT fStyle;
DWORD dwRop;
DWORD fState;
DWORD Frame;
COLORREF crEffect;
} IMAGELISTDRAWPARAMS;
Members
cbSize
Type: DWORD
The size of this structure, in bytes.
himl
Type: HIMAGELIST
A handle to the image list that contains the image to be drawn.
i
Type: int
The zero-based index of the image to be drawn.
hdcDst
Type: HDC
A handle to the destination device context.
x
Type: int
The x-coordinate that specifies where the image is drawn.
y
Type: int
The y-coordinate that specifies where the image is drawn.
cx
Type: int
A value that specifies the number of pixels to draw, relative to the upper-left corner of the drawing operation as specified by xBitmap and yBitmap. If cx and cy are zero, then Draw draws the entire valid section. The method does not ensure that the parameters are valid.
cy
Type: int
A value that specifies the number of pixels to draw, relative to the upper-left corner of the drawing operation as specified by xBitmap and yBitmap. If cx and cy are zero, then Draw draws the entire valid section. The method does not ensure that the parameters are valid.
xBitmap
Type: int
The x-coordinate that specifies the upper-left corner of the drawing operation in reference to the image itself. Pixels of the image that are to the left of xBitmap and above yBitmap do not appear.
yBitmap
Type: int
The y-coordinate that specifies the upper-left corner of the drawing operation in reference to the image itself. Pixels of the image that are to the left of xBitmap and above yBitmap do not appear.
rgbBk
Type: COLORREF
The image background color. This parameter can be an application-defined RGB value or one of the following values.
Value | Meaning |
---|---|
|
The default background color. The image is drawn using the image list background color. |
|
No background color. The image is drawn transparently. |
rgbFg
Type: COLORREF
The image foreground color. This member is used only if fStyle includes the ILD_BLEND25 or ILD_BLEND50 flag. This parameter can be an application-defined RGB value or one of the following values:
fStyle
Type: UINT
A flag specifying the drawing style and, optionally, the overlay image. See the comments section at the end of this topic for information on the overlay image. This member can contain one or more image list drawing flags.
dwRop
Type: DWORD
A value specifying a raster operation code. These codes define how the color data for the source rectangle will be combined with the color data for the destination rectangle to achieve the final color. This member is ignored if fStyle does not include the ILD_ROP flag. Some common raster operation codes include:
fState
Type: DWORD
A flag that specifies the drawing state. This member can contain one or more image list state flags. You must use comctl32.dll version 6 to use this member. See the Remarks.
Frame
Type: DWORD
Used with the alpha blending effect.
When used with ILS_ALPHA, this member holds the value for the alpha channel. This value can be from 0 to 255, with 0 being completely transparent, and 255 being completely opaque.
You must use comctl32.dll version 6 to use this member. See the Remarks.
crEffect
Type: DWORD
A color used for the glow and shadow effects. You must use comctl32.dll version 6 to use this member. See the Remarks.
Remarks
An overlay image is an image that is drawn on top of the primary image specified in the i member of this structure. To specify an overlay image, use the bitwise OR operator to combine fStyle with the INDEXTOOVERLAYMASK macro, passing the one-based index of the overlay image in the macro. This image must have been previously specified as an overlay image using the ImageList_SetOverlayImage API.
To extract the overlay image from the fStyle, use the bitwise AND operator to mask fStyle with the ILD_OVERLAYMASK value.
Comctl32.dll version 6 is not redistributable.. To use Comctl32.dll version 6, you must specify it in a 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] |
Header | commoncontrols.h (include Commctrl.h) |