Funktionreferenz


_GUICtrlTab_Destroy

Beschreibung anzeigen in

Löscht das Control

#include <GuiTab.au3>
_GUICtrlTab_Destroy ( ByRef $hWnd )

Parameter

$hWnd Control-ID / Handle des Controls

Rückgabewert

Erfolg: True, $hWnd wird auf 0 gesetzt
Fehler: False
@error: 1 - Es ist nicht erlaubt, andere Anwendungssteuerelemente zu zerstören.
2 - $hWnd ist kein Tab Control.

Bemerkungen

Funktioniert nur, falls das Tab-Control mit _GUICtrlTab_Create() erstellt wurde.

- - - - - - - - Erklärung der Controls - - - - - - - -

Verwandte Funktionen

_GUICtrlTab_Create

Beispiel

Beispiel 1

#include "Extras\HelpFileInternals.au3"

#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    ; Erstellt eine GUI
    Local $hGUI = GUICreate("Tab-Control: Zerstören (UDF)", 400, 300)
    Local $idTab = _GUICtrlTab_Create($hGui, 2, 2, 446, 266)

    _MemoMsgBoxStatus() ; Statuserstellung

    GUISetState(@SW_SHOW)

    ; Fügt Tabs hinzu
    _GUICtrlTab_InsertItem($idTab, 0, "Tab 0")
    _GUICtrlTab_InsertItem($idTab, 1, "Tab 1")
    _GUICtrlTab_InsertItem($idTab, 2, "Tab 2")

    _MemoMsgBox($MB_SYSTEMMODAL, "Information", "Tab-Control zerstören")
    _GUICtrlTab_Destroy($idTab)

    _MemoMsgBoxStatus("", -1, $hGUI) ; Keine weiteren Aktionen, es wird gewartet bis die GUI geschlossen wird.
EndFunc   ;==>Example

Example (OutProcess) : Tab Destroy to an External process

#include "Extras\HelpFileInternals.au3"

#include <GuiTab.au3>
#include <MsgBoxConstants.au3>

Example()

Func Example()
    Local $sFromTo
    Local $hWin = _MemoRunAU3OutProcess($sFromTo, False, "_GUICtrlTab_Create")
    Local $hTabCtrl = _MemoCreateOutProcess($hWin, "SysTabControl32", 2, $sFromTo)

    _GUICtrlTab_Destroy($hTabCtrl)

    If @error Then _MemoMsgBox($MB_ICONERROR, "Info" & $sFromTo, "@error=" & @error & " _GUICtrlTab_Destroy()" & @CRLF & @TAB & "cannot be used for an external process")

    _MemoMsgBoxStatus("", -1, $hWin) ; no more action, wait GUI for closing

EndFunc   ;==>Example