Diese Nachricht belegt Speicher für die zu speichernden Items
#include <GuiListBox.au3>
_GUICtrlListBox_InitStorage ( $hWnd, $iItems, $iBytes )
$hWnd | Control-ID / Handle des Controls |
$iItems | Die komplette Anzahl der Items die gespeichert werden sollen |
$iBytes | Die komplette Anzahl an Speicher, für den String, der belegt wird. |
- - - - - - - - Erklärung der Controls - - - - - - - -
_GUICtrlListBox_AddFile, _GUICtrlListBox_AddString, _GUICtrlListBox_Dir, _GUICtrlListBox_InsertString
#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $idListBox
; Erstellt eine GUI
GUICreate("ListBox: Speicher für die Items reservieren", 400, 296)
$idListBox = GUICtrlCreateList("", 2, 2, 396, 296)
GUISetState(@SW_SHOW)
; Fügt Dateien hinzu
_GUICtrlListBox_BeginUpdate($idListBox)
_GUICtrlListBox_ResetContent($idListBox)
MsgBox($MB_SYSTEMMODAL, "Information", "Speicher reserviert für: " & _GUICtrlListBox_InitStorage($idListBox, 100, 4096) & " Items")
_GUICtrlListBox_Dir($idListBox, @WindowsDir & "\win*.exe")
_GUICtrlListBox_AddFile($idListBox, @WindowsDir & "\notepad.exe")
_GUICtrlListBox_EndUpdate($idListBox)
; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example