AU3里有伴鼠标显示的放大镜吗?[已解决]
本帖最后由 cashiba 于 2017-2-8 17:05 编辑首先感谢tryhi 及其帖子:
http://www.autoitx.com/forum.php?mod=viewthread&tid=20307&highlight=%B7%C5%B4%F3%BE%B5
其中的放大镜源码如下:Global $SRCCOPY = 0x00CC0020
Global $leave = 0
HotKeySet("{esc}","exit_x")
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 Exit_x()
Exit
EndFunc美中不足,放大镜只是放大了像素,但是不能同时显示鼠标,不能精确显示目标点在放大镜里的位置。不能做到下图的效果:
如果放大镜里同时显示鼠标,怎么办呢? 好像改样式可行 期待高手帮助了 http://www.autoitx.com/forum.php?mod=viewthread&tid=23040&highlight=%C4%A4%B0%DD
水木子 发表于 2017-2-4 11:32 http://www.autoitx.com/images/common/back.gif
这个帖子,标题和内容都很少关键词,如果不是看到过,打死也搜不到....
感谢水版!
{:face (88):}
页:
[1]