FlatX007, посмотри внимательно на следующий код:
Код:
#Region
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Run_Au3check=n
#AutoIt3Wrapper_Run_After=ResHacker\ResHacker.exe -add %out%, %out%, Arrow.jpg, rcdata, "Arrow", 0
#EndRegion
#Include <GDIPlus.au3>
#Include <Resources.au3>
_GDIPlus_Startup()
$hImage = _ResourceGetAsImage("Arrow")
$hBitmap1 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
_GDIPlus_ImageRotateFlip($hImage, 1)
$hBitmap2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
_GDIPlus_ImageDispose($hImage)
$Form1 = GUICreate("", 236, 133)
$Pic1 = GUICtrlCreatePic("", 16, 16, 100, 100)
GUICtrlSendMsg(-1, 0x0172, 0, $hBitmap1)
$Pic2 = GUICtrlCreatePic("", 120, 16, 100, 100)
GUICtrlSendMsg(-1, 0x0172, 0, $hBitmap2)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
_GDIPlus_Shutdown()
Exit
EndSwitch
WEnd
; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_ImageRotateFlip
; Description ...: Rotates and flips an image
; Syntax.........: _GDIPlus_ImageRotateFlip($hImage, $iRotateFlipType)
; Parameters ....: $hImage - Pointer to an Image object
; $iRotateFlipType - Type of rotation and flip:
; |0 - No rotation and no flipping (A 180-degree rotation, a horizontal flip and then a vertical flip)
; |1 - A 90-degree rotation without flipping (A 270-degree rotation, a horizontal flip and then a vertical flip)
; |2 - A 180-degree rotation without flipping (No rotation, a horizontal flip folow by a vertical flip)
; |3 - A 270-degree rotation without flipping (A 90-degree rotation, a horizontal flip and then a vertical flip)
; |4 - No rotation and a horizontal flip (A 180-degree rotation followed by a vertical flip)
; |5 - A 90-degree rotation followed by a horizontal flip (A 270-degree rotation followed by a vertical flip)
; |6 - A 180-degree rotation followed by a horizontal flip (No rotation and a vertical flip)
; |7 - A 270-degree rotation followed by a horizontal flip (A 90-degree rotation followed by a vertical flip)
; Return values .: Success - True
; Failure - False and either:
; |@error and @extended are set if DllCall failed
; Remarks .......: None
; Related .......: None
; Link ..........; @@MsdnLink@@ GdipImageRotateFlip
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_ImageRotateFlip($hImage, $iRotateFlipType)
Local $aResult = DllCall($ghGDIPDll, "uint", "GdipImageRotateFlip", "hwnd", $hImage, "int", $iRotateFlipType)
If @error Then Return SetError(@error, @extended, False)
Return $aResult[0] = 0
EndFunc ;==>_GDIPlus_ImageRotateFlip