
Celui-ci fait une copie de votre écran et fait un mouvement de gauche à droite, graçe à la fonction _winapi_BitBlt (voir aide pour de plus amples information)
Faut que vous testiez, car j'explique très mal :p
Code : Tout sélectionner
#include <winapi.au3>
#include <WindowsConstants.au3>
Global $swid = _winapi_GetSystemMetrics($SM_CXSCREEN)
Global $shgt = _winapi_GetSystemMetrics($SM_CYSCREEN)
Global $dwid = $swid * 2
Global $hDC, $cDC, $hScr = 0, $hBmp, $hOld
$hDC= _winapi_GetDC($hScr)
$hBmp = _winapi_CreateCompatibleBitmap($hDC,$dwid,$shgt)
$cDC = _winapi_CreateCompatibleDC($hDC)
$hOld = _winapi_SelectObject($cDC,$hBmp)
_winapi_BitBlt($cDC,0,0,$swid,$shgt,$hDC,0,0,$SRCCOPY)
_winapi_BitBlt($cDC,$swid,0,$swid,$shgt,$hDC,0,0,$SRCCOPY)
For $i = $swid to 0 step - 8
_winapi_BitBlt($hDC,0,0,$swid,$shgt,$cDC,$i,0,$SRCCOPY)
Sleep(20)
next
_SendMessage(0,$WM_PAINT,$hDC,0)
_winapi_DeleteObject($hBmp)
_winapi_SelectObject($cDC,$hOld)
_winapi_DeleteDC($cDC)
_winapi_ReleaseDC($hScr,$hDC)
exit
Code : Tout sélectionner
#include <WindowsConstants.au3>
#include <WinAPI.au3>
$hScreenDC = _WinAPI_GetWindowDC(0)
$hMemDC = _WinAPI_CreateCompatibleDC($hScreenDC)
$hMemBMP = _WinAPI_CreateCompatibleBitmap($hScreenDC, @DesktopWidth*2, @DesktopHeight)
_WinAPI_DeleteObject(_WinAPI_SelectObject($hMemDC, $hMemBMP))
_WinAPI_BitBlt($hMemDC, 0, 0, @DesktopWidth, @DesktopHeight, $hScreenDC, 0, 0, $SRCCOPY)
_WinAPI_BitBlt($hMemDC, @DesktopWidth, 0, @DesktopWidth, @DesktopHeight, $hScreenDC, 0, 0, $SRCCOPY)
For $i = @DesktopWidth To 0 Step -8
_WinAPI_BitBlt($hScreenDC, 0, 0, @DesktopWidth, @DesktopHeight, $hMemDC, $i, 0, $SRCCOPY)
Sleep(20)
Next
_WinAPI_RedrawWindow(_WinAPI_GetDesktopWindow(), 0, 0, $RDW_INVALIDATE+$RDW_ALLCHILDREN)
_WinAPI_ReleaseDC(0, $hScreenDC)
_WinAPI_DeleteObject($hMemBMP)
_WinAPI_DeleteDC($hMemDC)
Exit