#include <WinAPI.au3>
#include <WinAPIGdi.au3>
#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("TrayAutoPause", 0)
Opt("GUIOnEventMode", 1)
HotKeySet("{ESC}", "_Exit")
Global $hGDI32, $hDC_GUI, $hDC_DESK
$hGDI32 = DllOpen("GDI32.dll")
OnAutoItExitRegister("_OnExit")
Global $iZoomW = 200, _
$iZoomH = 100, _
$iZoomX = @DesktopWidth / 2 - $iZoomW / 2, _
$iZoomY = @DesktopHeight / 2 - $iZoomH / 2, _
$iZoomStep = 3
Global $hGUI, _
$sTitle, _
$iW = $iZoomW * $iZoomStep, _
$iH = $iZoomH * $iZoomStep, _
$iX = 0, _
$iY = 0, _
$iStyle = $WS_POPUP, _
$iExStyle = BitOR($WS_EX_TOPMOST, $WS_EX_TRANSPARENT, $WS_EX_TOOLWINDOW)
$hGUI = GUICreate($sTitle, $iW, $iH, $iX, $iY, $iStyle, $iExStyle)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$hDC_GUI = _WinAPI_GetDC($hGUI)
$hDC_DESK = _WinAPI_GetDC(0)
;_WinAPI_SetStretchBltMode($hDC_GUI, $STRETCH_HALFTONE) ;Используйте чтобы убрать пикселизацию (дополнительная нагрузка)
;_WinAPI_SetBrushOrg($hDC_GUI, 0, 0) ;Используйте чтобы убрать пикселизацию (дополнительная нагрузка)
WinSetTrans($hGUI, Null, 255)
GUISetState()
While Sleep(10)
_StretchBlt($hDC_GUI, 0, 0, $iW, $iH, $hDC_DESK, $iZoomX, $iZoomY, $iZoomW, $iZoomH, $SRCCOPY, $hGDI32)
WEnd
Func _StretchBlt($hDestDC, $iXDest, $iYDest, $iWidthDest, $iHeightDest, $hSrcDC, $iXSrc, $iYSrc, $iWidthSrc, $iHeightSrc, $iRop, $vGDI32 = "GDI32.dll")
If $vGDI32 = Default Then $vGDI32 = "GDI32.dll"
Local $aRet = DllCall($vGDI32, "BOOL", "StretchBlt", _
"HANDLE", $hDestDC, _
"INT", $iXDest, _
"INT", $iYDest, _
"INT", $iWidthDest, _
"INT", $iHeightDest, _
"HANDLE", $hSrcDC, _
"INT", $iXSrc, _
"INT", $iYSrc, _
"INT", $iWidthSrc, _
"INT", $iHeightSrc, _
"DWORD", $iRop)
If @error Then Return SetError(@error, @extended, False)
Return $aRet[0]
EndFunc ;==>_StretchBlt
Func _OnExit()
_WinAPI_ReleaseDC(0, $hDC_DESK)
_WinAPI_ReleaseDC($hGUI, $hDC_GUI)
GUIDelete($hGUI)
DllClose($hGDI32)
EndFunc ;==>_OnExit
Func _Exit()
Exit
EndFunc ;==>_Exit