Ticket #2187: Exemple.au3

File Exemple.au3, 885 bytes (added by TommyDDR, 13 years ago)
Line 
1#include <EditConstants.au3>
2#include <GUIConstantsEx.au3>
3#include <GuiRichEdit.au3>
4#include <WindowsConstants.au3>
5
6Opt("GUIOnEventMode", 1)
7
8OnAutoItExitRegister("Exit_RichEdit")
9
10Global $Gui
11Global $RichEdit[3]
12
13$Gui = GUICreate("Exemple", 300, 300)
14GUISetBkColor(0xFF0000, $Gui)
15GUISetOnEvent($GUI_EVENT_CLOSE, "quit")
16$RichEdit[0] = _GUICtrlRichEdit_Create($Gui, "", 0, 0, 300, 90, BitOR($ES_MULTILINE, $WS_VSCROLL))
17$RichEdit[1] = _GUICtrlRichEdit_Create($Gui, "", 0, 100, 300, 90, BitOR($ES_MULTILINE, $WS_VSCROLL))
18$RichEdit[2] = _GUICtrlRichEdit_Create($Gui, "", -10, 200, 302, 90, BitOR($ES_MULTILINE, $WS_VSCROLL))
19GUISetState()
20
21While(True)
22        Sleep(10)
23WEnd
24
25Func Exit_RichEdit()
26        For $i = 0 To UBound($RichEdit, 1)-1
27                If($RichEdit[$i] > 0) Then
28                        _GUICtrlRichEdit_Destroy($RichEdit[$i])
29                EndIf
30        Next
31EndFunc
32
33Func quit()
34        Exit
35EndFunc