找回密码
 加入
搜索
查看: 1818|回复: 3

[系统综合] AU3里有伴鼠标显示的放大镜吗?[已解决]

[复制链接]
发表于 2017-1-21 14:34:36 | 显示全部楼层 |阅读模式
本帖最后由 cashiba 于 2017-2-8 17:05 编辑

首先感谢tryhi 及其帖子:
http://www.autoitx.com/forum.php ... =%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[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
Func Exit_x()
        Exit
EndFunc
美中不足,放大镜只是放大了像素,但是不能同时显示鼠标,不能精确显示目标点在放大镜里的位置。不能做到下图的效果:

如果放大镜里同时显示鼠标,怎么办呢?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2017-1-26 00:02:00 | 显示全部楼层
好像改样式可行 期待高手帮助了
发表于 2017-2-4 11:32:33 | 显示全部楼层
 楼主| 发表于 2017-2-8 17:00:12 | 显示全部楼层
水木子 发表于 2017-2-4 11:32

这个帖子,标题和内容都很少关键词,如果不是看到过,打死也搜不到....
感谢水版!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-3-29 02:36 , Processed in 0.076134 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表