Fügt einen Text am Ende des Anwendungsbereichs hinzu
#include <GuiRichEdit.au3>
_GUICtrlRichEdit_AppendText ( $hWnd, $sText )
$hWnd | Handle des Controls |
$sText | Text der angefügt werden soll |
Erfolg: | True |
Fehler: | False und setzt das @error Flag auf ungleich null |
@error: | 101 - $hWnd ist kein Handle |
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlRichEdit_GetText, _GUICtrlRichEdit_InsertText, _GUICtrlRichEdit_ReplaceText, _GUICtrlRichEdit_SetText
Suche nach EM_SETTEXTEX in der MSDN Bibliothek.
#include <GUIConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <WindowsConstants.au3>
Example()
Func Example()
Local $hGui, $g_hRichEdit, $iMsg
$hGui = GUICreate("Beispiel (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1)
$g_hRichEdit = _GUICtrlRichEdit_Create($hGui, "Das ist ein Test.", 10, 10, 300, 220, _
BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL))
GUISetState(@SW_SHOW)
_GUICtrlRichEdit_AppendText($g_hRichEdit, @CR & "Dies ist ein angehängter Text.")
While True
$iMsg = GUIGetMsg()
Select
Case $iMsg = $GUI_EVENT_CLOSE
_GUICtrlRichEdit_Destroy($g_hRichEdit) ; notwendig, da sonst das Skript abstürzt
;~ GUIDelete() ; ist auch in Ordnung
Exit
EndSelect
WEnd
EndFunc ;==>Example