回复 流沙枫
这是什么意思,没看懂,你明白我那个判断条件是什么意思吗?
if IsDeclared($edit0) And ...
netegg 发表于 2013-1-18 20:11 #include <GUIConstantsEx.au3>
#Include <GuiEdit.au3>
Global $iMemo
_Main()
Func _Main()
Local $tFile, $tSystem,$edit0,$edit1,$hGUI
; Create GUI
;GUICreate("edit", 400, 300)
$hGUI = GUICreate("Edit Create", 400, 300)
$iMemo = _GUICtrlEdit_Create($hGUI, "", 2, 2, 394, 268)
;$iMemo = GUICtrlCreateEdit("", 2, 2, 396, 296, $WS_VSCROLL)
;GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New")
GUISetState()
if guictrlgethandle($iMemo)="edit0" then
MemoWrite("edit0" )
else
MemoWrite("edit1")
endif
; Encode a file time
;MemoWrite("System file time .: " & _Date_Time_SystemTimeToDateTimeStr($tSystem))
; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc ;==>_Main
Func MemoWrite($sMessage)
GUICtrlSetData($iMemo, $sMessage & @CRLF, 1)
EndFunc ;==>MemoWrite
不用声明吧,判断有没这个句柄就可以了?
GUICtrlCreateEdit 自动生成句柄,控件ID? |