Obtient une partie ou tous les attributs d'un élément
#include <GuiListView.au3>
_GUICtrlListView_GetItemEx ( $hWnd, ByRef $tItem )
$hWnd | ID/handle du contrôle |
$tItem | La structure $tagLVITEM qui spécifie les informations à récupérer |
Succès: | Retourne True. |
Échec: | Retourne False. |
$tagLVITEM, _GUICtrlListView_GetItem
#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $tItem, $idListview GUICreate("ListView Get ItemEX", 400, 300) $idListview = GUICtrlCreateListView("Items", 2, 2, 394, 268) GUISetState(@SW_SHOW) GUICtrlCreateListViewItem("Item 1", $idListview) GUICtrlCreateListViewItem("Item 2", $idListview) GUICtrlCreateListViewItem("Item 3", $idListview) ; Affiche l'état raw de l'élément 1 $tItem = DllStructCreate($tagLVITEM) DllStructSetData($tItem, "Mask", $LVIF_STATE) DllStructSetData($tItem, "Item", 1) DllStructSetData($tItem, "StateMask", -1) _GUICtrlListView_GetItemEx($idListview, $tItem) MsgBox($MB_SYSTEMMODAL, "Information", "Item 2 State: " & DllStructGetData($tItem, "State")) ; Sélectionne l'élément 2 _GUICtrlListView_SetItemSelected($idListview, 1) ; Affiche l'état raw de l'élément 1 _GUICtrlListView_GetItemEx($idListview, $tItem) MsgBox($MB_SYSTEMMODAL, "Information", "Item 2 State: " & DllStructGetData($tItem, "State")) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example