Delete the control
#include <GuiTab.au3>
_GUICtrlTab_Destroy ( ByRef $hWnd )
$hWnd | Control ID/Handle to the control |
Success: | True, $hWnd is set to 0. |
Failure: | False. |
@error: | 1 - Not Allowed to Destroy Other Applications Control(s). 2 - $hWnd is not tab control. |
Restricted to only be used on Tab controls created with _GUICtrlTab_Create().
#include "Extras\HelpFileInternals.au3"
#include <GUIConstantsEx.au3>
#include <GuiTab.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Create GUI
Local $hGUI = GUICreate("Tab Destroy - v(" & @AutoItVersion & ")", 450, 300, 100, 100)
Local $hTab = _GUICtrlTab_Create($hGUI, 2, 2, 446, 266)
_MemoMsgBoxStatus() ; Status creation
GUISetState(@SW_SHOW)
; Add tabs
_GUICtrlTab_InsertItem($hTab, 0, "Tab 0")
_GUICtrlTab_InsertItem($hTab, 1, "Tab 1")
_GUICtrlTab_InsertItem($hTab, 2, "Tab 2")
_MemoMsgBox($MB_SYSTEMMODAL, "Information", "Destroy all Tabs")
_GUICtrlTab_Destroy($hTab)
_MemoMsgBoxStatus("", -1, $hGUI) ; no more action, wait GUI for closing
EndFunc ;==>Example
#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