Function Reference

_GUICtrlComboBox_DeleteString

文字列を削除します。

#Include <GuiComboBox.au3>
_GUICtrlComboBox_DeleteString($hWnd, $iIndex)

 

パラメータ

$hWnd コントロールのハンドル
$iIndex 文字列のゼロ始まりのインデックス

 

返し値

成功: 残りの文字列の総数
失敗: -1

 

注意

なし。

 

関連

_GUICtrlComboBox_AddString, _GUICtrlComboBox_ResetContent

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GUIComboBox.au3>
#include <GuiConstantsEx.au3>
#include <Constants.au3>

Opt('MustDeclareVars', 1)

$Debug_CB = False ; ComboBox/ComboBoxEx関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $hCombo
   
    ; GUIを作成
    GUICreate("ComboBox Delete String", 400, 296)
    $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296)
    GUISetState()

    ; ドライブを追加
    _GUICtrlComboBox_AddDir($hCombo, "", $DDL_DRIVES, False)
   
    ; 文字列を削除
    MsgBox(4160, "Information", "Deleting string at index 1")
    _GUICtrlComboBox_DeleteString($hCombo, 1)

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main