#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 332, 153, 192, 124)
$Radio1 = GUICtrlCreateRadio("测试", 16, 32, 49, 17)
$Input1 = GUICtrlCreateInput("", 56, 72, 137, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam)
#forceref $hWnd, $iMsg
Local $hWndFrom, $iIDFrom, $iCode
$iIDFrom = BitAND($iwParam, 0xFFFF)
$iCode = BitShift($iwParam, 16)
Switch $iIDFrom
Case $Input1
Switch $iCode
Case $EN_UPDATE ; Sent when an edit control is about to redraw itself
If Not StringLen(GUICtrlRead($Input1)) Then
GUICtrlSetState($Radio1, $GUI_UNCHECKED)
Else
GUICtrlSetState($Radio1, $GUI_CHECKED)
EndIf
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_COMMAND
|