Supprime le contrôle RichEdit
#include <GuiRichEdit.au3>
_GUICtrlRichEdit_Destroy ( ByRef $hWnd )
$hWnd | ID/handle du contrôle |
Succès: | Retourne 1, $hWnd est réglé sur 0. |
Échec: | Retourne 0 et définit @error <> 0. |
@error: | 1 - tentative de détruire un contrôle qui appartient à une autre application |
Réservé uniquement aux contrôles RichEdit créés avec _GUICtrlRichEdit_Create().
#include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui, $iMsg, $idBtnDoIt, $hRichEdit $hGui = GUICreate("Exemple (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "Ceci est un test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) $idBtnDoIt = GUICtrlCreateButton("Do it", 10, 260, 90, 25) GUISetState(@SW_SHOW) Do $iMsg = GUIGetMsg() If $iMsg = $idBtnDoIt Then _GUICtrlRichEdit_Destroy($hRichEdit) EndIf Until $iMsg = $GUI_EVENT_CLOSE GUIDelete() ; Nécessaire à moins que le script se bloque EndFunc ;==>Example