本帖最后由 seniors 于 2013-9-11 07:26 编辑
#Include <APIConstants.au3>
#Include <EditConstants.au3>
#Include <GUIConstantsEx.au3>
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $hForm, $Msg, $Input, $Button
$hForm = GUICreate('MyGUI', 400, 93)
$Input = GUICtrlCreateInput('', 20, 20, 360, 20)
$Button = GUICtrlCreateButton('Exit', 165, 59, 70, 23)
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')
GUISetState()
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE, $Button
ExitLoop
EndSwitch
WEnd
Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
Switch $hWnd
Case $hForm
Switch _WinAPI_LoWord($wParam)
Case $Input
Switch _WinAPI_HiWord($wParam)
Case $EN_SETFOCUS
_WinAPI_HideCaret($lParam);不显示光标
_WinAPI_SetCaretBlinkTime(-1);光标不闪烁
EndSwitch
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
|