#include <file.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
Opt('MustDeclareVars', 1)
Global $oMyError
Example()
Func Example()
Local $myedit, $msg,$str
GUICreate("我的编辑框窗口") ; 创建居中窗口
$myedit = GUICtrlCreateEdit("第一行" & @CRLF, 2, 2, 400, 400, $ES_readonly+$WS_VSCROLL)
GUISetState()
FileOpen("1.txt",0)
$str=FileRead("1.txt")
GUICtrlSetData($myedit,$str)
FileClose("1.txt")
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
EndFunc ;==>Example
|