放大镜指针调准问题
Global $SRCCOPY = 0x00CC0020Global $leave = 0
HotKeySet("","leave")
SplashTextOn ( "AU3MAG", "" , 100 , 100 , 0, 0, 1 )
$MyhWnd = WinGetHandle("AU3MAG")
While Not $leave
Sleep(25)
MAG()
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-10
$t = $xy-10
DLLCall("gdi32.dll","int","StretchBlt","int",$MyHDC,"int",0,"int",0,"int",100,"int",100,"int",$DeskHDC,"int",$l,"int",$t,"int",20,"int",20,"long",$SRCCOPY)
EndIf
DLLCall("user32.dll","int","ReleaseDC","int",$DeskHDC,"hwnd",0)
EndIf
DLLCall("user32.dll","int","ReleaseDC","int",$MyHDC,"hwnd",$MyhWnd)
EndFunc
Func leave()
$leave = 1
EndFunc
上面这断是放大镜的代码,但它的范围太小:face (13): ,我想把范围扩大但扩大后 指帧却不准了:face (3):想问大大门 如果扩大 要调整哪些数值,,,,,我想做出如http://www.autoitx.com/forum.php?mod=viewthread&tid=2051&extra=page%3D1 补助软件中的 确定坐标时 那种放大镜的效果
[ 本帖最后由 askask150 于 2008-12-14 04:55 编辑 ]
SplashTextOn ( "AU3MAG", "" , 200 , 200 , 0, 0, 1 );基本的显示尺寸定义行
DLLCall("gdi32.dll","int","StretchBlt","int",$MyHDC, _
"int",0,"int",0,"int",200,"int",200,"int",$DeskHDC, _
"int",$l,"int",$t,"int",50,"int",50,"long",$SRCCOPY) ;回显的尺寸定义
;看其中的修改,就知道什么回事
If Not @error Then
$l = $xy-10
$t = $xy-10
这个呢有什么用?
为什么指针在这个窗口准 在另外一个窗口就不准
[ 本帖最后由 askask150 于 2008-12-12 02:05 编辑 ] 原帖由 askask150 于 2008-12-12 00:48 发表 http://www.autoitx.com/images/common/back.gif
If Not @error Then
$l = $xy-10
$t = $xy-10
这个呢有什么用?
为什么指针在这个窗口准 在另外一个窗口就不准
是因不同情况而设的偏移,窗口的不同有可能引起改变
页:
[1]