Draws an image list item in the specified device context
#include <GuiImageList.au3>
_GUIImageList_Draw ( $hWnd, $iIndex, $hDC, $iX, $iY [, $iStyle = 0] )
$hWnd | Handle to the imagelist |
$iIndex | 0-based index of the image to draw |
$hDC | Handle to the destination device context |
$iX | X coordinate where the image will be drawn |
$iY | Y coordinate where the image will be drawn |
$iStyle | [optional] Drawing style and overlay image: 1 - Draws the image transparently using the mask, regardless of the background color 2 - Draws the image, blending 25 percent with the system highlight color 4 - Draws the image, blending 50 percent with the system highlight color 8 - Draws the mask |
Success: | True. |
Failure: | False. |
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <WinAPIGdi.au3>
#include <WinAPIGdiDC.au3>
Example()
Func Example()
Local $hImage, $hGUI, $hDC
$hGUI = GUICreate("ImageList Draw", 400, 300)
GUISetState(@SW_SHOW)
; Load images
$hImage = _GUIImageList_Create(32, 24)
_GUIImageList_Add($hImage, _WinAPI_CreateSolidBitmap($hGUI, 0xFF0000, 32, 24))
_GUIImageList_Add($hImage, _WinAPI_CreateSolidBitmap($hGUI, 0x00FF00, 32, 24))
_GUIImageList_Add($hImage, _WinAPI_CreateSolidBitmap($hGUI, 0x0000FF, 32, 24))
; Draw images
$hDC = _WinAPI_GetDC($hGUI)
_GUIImageList_Draw($hImage, 0, $hDC, 4, 4)
_GUIImageList_Draw($hImage, 1, $hDC, 40, 4)
_GUIImageList_Draw($hImage, 2, $hDC, 76, 4)
_WinAPI_ReleaseDC($hGUI, $hDC)
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example