Code : Tout sélectionner
#include <GUIConstantsEx.au3>
#include <WinAPIGdi.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local Const $iW = 200, $iH = 200
Local $hBitmap = _WinAPI_LoadImage(0, @ProgramFilesDir & '\AutoIt3\Examples\Helpfile\Extras\Hatch.bmp', $IMAGE_BITMAP, 0, 0, $LR_LOADFROMFILE)
Local $hGUI1 = GUICreate("", $iW , $iH , -1, -1)
GUISetBkColor(0xFFFFE1)
Local $pic = GUICtrlCreatePic("" , 0,0, $iW , $iH )
$hpic = GUICtrlGetHandle($pic)
GUISetState(@SW_SHOW)
ToolTip("en attente",300,300)
$hDC = _WinAPI_GetDC($hPic)
$hDestDC = _WinAPI_CreateCompatibleDC($hDC)
_WinAPI_SelectObject($hDestDC, $hBitmap)
_WinAPI_TransparentBlt($hDC, 0, 0, 100, 100, $hDestDC, 0, 0, 100, 100, 0x646664)
Sleep(3000)
_WinAPI_RedrawWindow($hGUI1)
_WinAPI_TransparentBlt($hDC, 0, 0, 100, 100, $hDestDC, 0, 0, 100, 100, 0xA4A2A4)
Sleep(3000)
_WinAPI_RedrawWindow($hGUI1)
_WinAPI_BitBlt($hDC, 0, 0, 100, 100, $hDestDC, 0, 0,$SRCCOPY)
ToolTip("")
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
EndSwitch
WEnd
_WinAPI_DeleteDC($hDestDC)
_WinAPI_ReleaseDC($hPic, $hDC)
_WinAPI_DeleteObject($hBitmap)
GUIDelete($hGUI1)
EndFunc ;==>Example