找回密码
 加入
搜索
查看: 146|回复: 2

[AU3基础] 【已解决】关于如何解决GUICtrlCreateInput使用密码样式后,字符数量受到宽度限制?

[复制链接]
发表于 2024-2-12 20:50:22 | 显示全部楼层 |阅读模式
本帖最后由 anythinging 于 2024-2-12 21:01 编辑

请教下,GUICtrlCreateInput在使用密码新式后,输入的字符存在不能超过控件的宽度的情况。

#include <EditConstants.au3>


opt('GUIOnEventMode',1)


GUICreate('',400,300)
GUISetOnEvent(-3,'_exit')
GUISetState()

$input = GUICtrlCreateInput('',10,20,100,20,$ES_PASSWORD)

GUICtrlCreateButton('1',200,250,100,20)
GUICtrlSetOnEvent(-1,'_bt1')


While 1
        Sleep(50)
WEnd


Func _bt1()
        $a = GUICtrlRead($input)
        MsgBox(262144,'',$a)
EndFunc

Func _exit()
        Exit
EndFunc

 楼主| 发表于 2024-2-12 20:57:13 | 显示全部楼层
用这个 BitOR($GUI_SS_DEFAULT_INPUT, $ES_PASSWORD) 解决了
 楼主| 发表于 2024-2-12 20:58:43 | 显示全部楼层
参考了autoitx中的一个他人创建的代码解决了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-2 18:45 , Processed in 0.073054 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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