ImageList_DrawEx (comctl32)
Last changed: -174.27.67.128

.
Summary
Draws an image list item in the specified device context.

C# Signature:

/// <summary>
/// Draws an image list item in the specified device context.
/// </summary>
/// <param name="himl">
/// Handle to the image list.
/// </param>
/// <param name="i">
/// Index of the image to draw.
/// </param>
/// <param name="hdcDst">
/// Handle to the destination device context.
/// </param>
/// <param name="x">
/// X-coordinate at which to draw within the specified device context.
/// </param>
/// <param name="y">
/// Y-coordinate at which to draw within the specified device context.
/// </param>
/// <param name="dx">
/// Width of the portion of the image to draw relative to the upper-left corner of the image. If dx and dy are zero, the function draws the entire  image. The function does not ensure that the parameters are valid.
/// </param>
/// <param name="dy">
/// Height of the portion of the image to draw, relative to the upper-left corner of the image. If dx and dy are zero, the function draws the entire  image. The function does not ensure that the parameters are valid.
/// </param>
/// <param name="rgbBk">
/// Background color of the image.
/// </param>
/// <param name="rgbFg">
/// Foreground color of the image.
/// </param>
/// <param name="fStyle">
/// Drawing style and, optionally, the overlay image.
/// </param>
/// <returns>
/// Returns nonzero if successful, or zero otherwise.
/// </returns>
[DllImport("comctl32.dll", SetLastError=true)]
static extern bool ImageList_DrawEx(IntPtr himl, int i, IntPtr hdcDst, int x, int y, int dx, int dy, int rgbBk, int rgbFg, int fStyle);

VB Signature:

Declare Function ImageList_DrawEx Lib "comctl32.dll" (TODO) As TODO

''' <summary>
''' Draws an image list item in the specified device context.
''' </summary>
''' <param name="himl">
''' Handle to the image list.
''' </param>
''' <param name="i">
''' Index of the image to draw.
''' </param>
''' <param name="hdcDst">
''' Handle to the destination device context.
''' </param>
''' <param name="x">
''' X-coordinate at which to draw within the specified device context.
''' </param>
''' <param name="y">
''' Y-coordinate at which to draw within the specified device context.
''' </param>
''' <param name="dx">
''' Width of the portion of the image to draw relative to the upper-left corner of the image. If dx and dy are zero, the function draws the entire  image. The function does not ensure that the parameters are valid.
''' </param>
''' <param name="dy">
''' Height of the portion of the image to draw, relative to the upper-left corner of the image. If dx and dy are zero, the function draws the entire  image. The function does not ensure that the parameters are valid.
''' </param>
''' <param name="rgbBk">
''' Background color of the image.
''' </param>
''' <param name="rgbFg">
''' Foreground color of the image.
''' </param>
''' <param name="fStyle">
''' Drawing style and, optionally, the overlay image.
''' </param>
''' <returns>
''' Returns nonzero if successful, or zero otherwise.
''' </returns>
<DllImport("comctl32.dll", SetLastError := True)> _
Private Shared Function ImageList_DrawEx(himl As IntPtr, i As Integer, hdcDst As IntPtr, x As Integer, y As Integer, dx As Integer, _
    dy As Integer, rgbBk As Integer, rgbFg As Integer, fStyle As Integer) As Boolean
End Function

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation