晚安!#include <GUIConstantsEx.au3>
#include <Editconstants.au3>
#include <WindowsConstants.au3>
;Global $EM_SETPASSWORDCHAR = 0xCC
GUICreate("Test", 350, 98, 192, 124)
$input_qq = GUICtrlCreateInput("请输入qq号码", 88, 62, 201, 21)
$input_pw = GUICtrlCreateInput('请输入密码', 88, 32, 201, 21)
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
GUISetState()
While 1
If GUIGetMsg() = -3 Then ExitLoop
WEnd
Func WM_COMMAND($hWnd, $msg, $wParam, $lParam)
Local $iCode = BitShift($wParam, 16)
Switch $lParam
Case GUICtrlGetHandle($input_pw)
Switch $iCode
Case $EN_KILLFOCUS
If GUICtrlRead($input_pw) == '' Then GUICtrlSetData($input_pw, '请输入密码')
If GUICtrlRead($input_pw) = '请输入密码' Then
GUICtrlSendMsg($input_pw, $EM_SETPASSWORDCHAR, 0, 0)
EndIf
Case $EN_SETFOCUS
If GUICtrlRead($input_pw) = '请输入密码' Then GUICtrlSetData($input_pw, '')
GUICtrlSendMsg($input_pw, $EM_SETPASSWORDCHAR, 42, 0)
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc 回复 16# user3000
谢谢你 这么复杂啊,,学习中 不错~ 学习了~ 回复qsy666888
晚安!
user3000 发表于 2014-7-21 22:55 http://www.autoitx.com/images/common/back.gif
学习了! 你的意思是不是设置input默认值啊 本帖最后由 dunphy 于 2014-7-25 09:05 编辑
qsy666888.你多自己想想 @user3000学习了!
楼主请将在标题前加上“已解决”字样。
页:
1
[2]