Код:
#Include <GDIP.au3>
#Include <WinAPI.au3>
Global Const $STM_SETIMAGE = 0x0172
Global Const $STM_GETIMAGE = 0x0173
Dim $Pic[4]
GUICreate('MyGUI', 4 * 128, 128)
For $i = 0 To 3
$Pic[$i] = GUICtrlCreatePic('', $i * 128, 0, 128, 128)
Next
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile('Arrow.png')
For $i = 0 To 3
_GDIPlus_ImageRotateFlip($hImage, 1)
_SetImage($Pic[$i], _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage))
Next
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
GUISetState()
Do
Until GUIGetMsg() = -3
Func _SetImage($hWnd, $hBitmap)
If Not IsHWnd($hWnd) Then
$hWnd = GUICtrlGetHandle($hWnd)
If Not $hWnd Then
Return
EndIf
EndIf
Local $hObj
$hObj = _SendMessage($hWnd, $STM_SETIMAGE, 0, $hBitmap)
If $hObj Then
_WinAPI_DeleteObject($hObj)
EndIf
_WinAPI_InvalidateRect($hWnd)
$hObj = _SendMessage($hWnd, $STM_GETIMAGE)
If $hObj <> $hBitmap Then
_WinAPI_DeleteObject($hBitmap)
EndIf
EndFunc ;==>_SetImage
GDIP UDF