#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;Global $SRCCOPY = 0x00CC0020
Global $leave = 0
SplashTextOn("AU3MAG", "", 100, 100, 100, 0, 1)
$MyhWnd = WinGetHandle("AU3MAG")
;WinSetState($MyhWnd, '', @SW_HIDE)
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("窗体1", 374, 215, -1, -1)
$Label1 = GUICtrlCreateLabel("当鼠标移动到字体上时如何放大字体", 40, 88, 276, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
WinMove($MyhWnd,'',$mouse[0]+20,$mouse[1]+20)
mag()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
SplashOff()
Exit
EndSwitch
WEnd
Func MAG()
$MyHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", $MyhWnd)
If @error Then Return
$DeskHDC = DllCall("user32.dll", "int", "GetDC", "hwnd", 0)
If Not @error Then
$xy = MouseGetPos()
If Not @error Then
$l = $xy[0] - 10
$t = $xy[1] - 10
DllCall("gdi32.dll", "int", "StretchBlt", "int", $MyHDC[0], "int", 0, "int", 0, "int", 100, "int", 100, "int", $DeskHDC[0], "int", $l, "int", $t, "int", 20, "int", 20, "long", $SRCCOPY)
EndIf
DllCall("user32.dll", "int", "ReleaseDC", "int", $DeskHDC[0], "hwnd", 0)
EndIf
DllCall("user32.dll", "int", "ReleaseDC", "int", $MyHDC[0], "hwnd", $MyhWnd)
EndFunc ;==>MAG