UDF > GUI > GuiListView >


_GUICtrlListView_Create

Crée un contrôle ListView

#include <GuiListView.au3>
_GUICtrlListView_Create ( $hWnd, $sHeaderText, $iX, $iY [, $iWidth = 150 [, $iHeight = 150 [, $iStyle = 0x0000000D [, $iExStyle = 0x00000000 [, $bCoInit = False]]]]] )

Paramètres

$hWnd Handle du parent ou du propriétaire de la fenêtre
$sHeaderText Texte à afficher dans l'en-tête. Délimiteur: "|"
$iX Position horizontale du contrôle
$iY Position verticale du contrôle
$iWidth [optionnel] Largeur du contrôle
$iHeight [optionnel] Hauteur du contrôle
$iStyle [optionnel] Styles du contrôle:
    $LVS_ALIGNLEFT - Les éléments sont alignés à gauche dans le mode d'affichage avec icônes et petites icônes
    $LVS_ALIGNTOP - Les éléments sont alignés en haut du contrôle dans le mode d'affichage avec icônes et petites icônes
    $LVS_AUTOARRANGE - Les icônes sont automatiquement gardées arrangées dans le mode d'affichage avec icônes et petites icônes
    $LVS_EDITLABELS - Le texte des éléments peut être modifié en place
    $LVS_ICON - Ce style spécifie le mode d'affichage avec icône
    $LVS_LIST - Ce style spécifie le mode d'affichage en liste
    $LVS_NOCOLUMNHEADER - L'en-tête des colonnes n'est pas affiché dans le mode d'affichage en rapport
    $LVS_NOLABELWRAP - Le texte des éléments est affiché sur une seule ligne dans le mode d'affichage avec icônes
    $LVS_NOSCROLL - Le défilement est désactivé
    $LVS_NOSORTHEADER - L'en-tête des colonnes ne fonctionnent pas comme des boutons
    $LVS_OWNERDATA - Ce style spécifie un contrôle virtuel
    $LVS_OWNERDRAWFIXED - La fenêtre propriétaire peut peindre les éléments dans le mode d'affichage en rapport
    $LVS_REPORT - Ce style spécifie le mode d'affichage en rapport
    $LVS_SHAREIMAGELISTS - La liste d'images ne sera pas supprimée
    $LVS_SHOWSELALWAYS - La sélection, le cas échéant, est toujours affichée
    $LVS_SINGLESEL - Un seul élément à la fois peut être sélectionné
    $LVS_SMALLICON - Ce style spécifie le mode d'affichage avec petites icônes
    $LVS_SORTASCENDING - Les index des éléments sont triés en ordre croissant
    $LVS_SORTDESCENDING - Les index des éléments sont triés en ordre décroissant

Par défaut: $LVS_REPORT, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS
Forcé: $WS_CHILD, $WS_VISIBLE
$iExStyle [optionnel] Styles étendus du contrôle. La valeur peut être une combinaison des éléments suivants:
    $LVS_EX_BORDERSELECT - Quand un élément est sélectionné, la couleur de la bordure de l'élément change
    $LVS_EX_CHECKBOXES - Permet des cases à cocher pour les éléments dans un contrôle ListView
    $LVS_EX_DOUBLEBUFFER - La peinture se fait avec une double mémoire tampon, ce qui réduit le scintillement
    $LVS_EX_FLATSB - Permet des barres de défilement sans relief dans la ListView
    $LVS_EX_FULLROWSELECT - Quand un élément est sélectionné, l'élément et tous ses sous-éléments sont surlignés
    $LVS_EX_GRIDLINES- Affiche un quadrillage autour des éléments et des sous-éléments
    $LVS_EX_HEADERDRAGDROP - Permet la réorganisation des colonnes par tirer-déposer
    $LVS_EX_INFOTIP - Le message de notification $LVN_GETINFOTIP est envoyé avant d'afficher une info-bulle
    $LVS_EX_LABELTIP - S'il n'est pas installé, les étiquettes sont partiellement cachées, seulement pour la présentation avec grande icône
    $LVS_EX_MULTIWORKAREAS - Le contrôle n'arrangera pas ses icônes jusqu'à ce que une ou plusieurs zones de travail soient définies
    $LVS_EX_ONECLICKACTIVATE - Le contrôle envoie un message $LVN_ITEMACTIVATE lorsque l'utilisateur clique sur un élément
    $LVS_EX_REGIONAL - Définit la zone de contrôle pour inclure uniquement l'icône et le texte des éléments
    $LVS_EX_SIMPLESELECT - Dans le mode d'affichage avec icônes, déplace l'image de l'état du contrôle en haut à droite
    $LVS_EX_SUBITEMIMAGES - Permet l'affichage des images pour les sous-éléments
    $LVS_EX_TRACKSELECT - Permet la sélection à chaud dans le contrôle
    $LVS_EX_TWOCLICKACTIVATE - Le contrôle envoie un message $LVN_ITEMACTIVATE lorsque l'utilisateur double-clique sur un élément
    $LVS_EX_UNDERLINECOLD - Les éléments 'non-hot' pouvant être activés seront affichés en surligné
    $LVS_EX_UNDERLINEHOT - Les éléments 'hot' pouvant être activés seront affichés en surligné
$bCoInit [optionnel] Initialise la bibliothèque COM pour une utilisation par le thread appelant.

Valeur de retour

Succès: Retourne le handle du contrôle ListBox.
Échec: Retourne 0 et définit @error <> 0.
@error: 1 - Handle de fenêtre non valide
2 - Le texte d'en-tête n'est pas une chaîne

Remarque

Cette fonction est destinée aux utilisateurs avertis et à ceux qui veulent comprendre comment fonctionne le contrôle.

En relation

_GUICtrlListView_Destroy, _GUICtrlListView_SetBkImage

Exemple

#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>

Global $g_hListView

Example()

Func Example()
    Local $hGUI, $hImage
    $hGUI = GUICreate("(UDF Created) ListView Create", 400, 300)

    $g_hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 394, 268)
    _GUICtrlListView_SetExtendedListViewStyle($g_hListView, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
    GUISetState(@SW_SHOW)

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    ; Charge des images
    $hImage = _GUIImageList_Create()
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($g_hListView, 0xFF0000, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($g_hListView, 0x00FF00, 16, 16))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($g_hListView, 0x0000FF, 16, 16))
    _GUICtrlListView_SetImageList($g_hListView, $hImage, 1)

    ; Ajoute des colonnes
    _GUICtrlListView_InsertColumn($g_hListView, 0, "Column 1", 100)
    _GUICtrlListView_InsertColumn($g_hListView, 1, "Column 2", 100)
    _GUICtrlListView_InsertColumn($g_hListView, 2, "Column 3", 100)

    ; Ajoute des éléments
    _GUICtrlListView_AddItem($g_hListView, "Row 1: Col 1", 0)
    _GUICtrlListView_AddSubItem($g_hListView, 0, "Row 1: Col 2", 1)
    _GUICtrlListView_AddSubItem($g_hListView, 0, "Row 1: Col 3", 2)
    _GUICtrlListView_AddItem($g_hListView, "Row 2: Col 1", 1)
    _GUICtrlListView_AddSubItem($g_hListView, 1, "Row 2: Col 2", 1)
    _GUICtrlListView_AddItem($g_hListView, "Row 3: Col 1", 2)

    ; Boucle jusqu'à ce que l'utilisateur quitte.
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>Example

Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
    #forceref $hWnd, $iMsg, $wParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    ; Local $tBuffer
    $hWndListView = $g_hListView
    If Not IsHWnd($g_hListView) Then $hWndListView = GUICtrlGetHandle($g_hListView)

    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom

        Case $hWndListView
            Switch $iCode

                ; Case $LVN_BEGINDRAG 
                ; Une opération de glisser-déposer impliquant le bouton gauche de la souris est lancée
                ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                ; _DebugPrint("$LVN_BEGINDRAG" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                ; "-->Code:" & @TAB & $iCode & @CRLF & _
                ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                ; ; Aucune valeur retournée

                ; Case $LVN_BEGINLABELEDIT 
                ; Démarre l'édition d'une étiquette d'un élément
                ; $tInfo = DllStructCreate($tagNMLVDISPINFO, $lParam)
                ; _DebugPrint("$LVN_BEGINLABELEDIT" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                ; "-->Code:" & @TAB & $iCode & @CRLF & _
                ; "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @CRLF & _
                ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                ; "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @CRLF & _
                ; "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @CRLF & _
                ; "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @CRLF & _
                ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @CRLF & _
                ; "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @CRLF & _
                ; "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @CRLF & _
                ; "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @CRLF & _
                ; "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
                ; Return False ; Autorise l'utilisateur de modifier l'étiquette
                ; ; Return True  ; Empêche l'utilisateur de modifier l'étiquette

                ; Case $LVN_BEGINRDRAG 
                ; Une opération glisser-déposer impliquant le bouton droit de la souris est en train d'être initialisé
                ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                ; _DebugPrint("$LVN_BEGINRDRAG" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                ; "-->Code:" & @TAB & $iCode & @CRLF & _
                ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                ; ; Aucune valeur retournée

                ; Case $LVN_BEGINSCROLL 
                ; Une  opération de défilement démarre, Minium OS WinXP
                ; $tInfo = DllStructCreate($tagNMLVSCROLL, $lParam)
                ; _DebugPrint("$LVN_BEGINSCROLL" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                ; "-->Code:" & @TAB & $iCode & @CRLF & _
                ; "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @CRLF & _
                ; "-->DY:" & @TAB & DllStructGetData($tInfo, "DY"))
                ; ; Aucune valeur retournée

                Case $LVN_COLUMNCLICK 
                    ; Une colonne a été cliquée
                    $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    _DebugPrint("$LVN_COLUMNCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                            "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                            "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                            "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                            "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                            "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                            "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                            "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; Aucune valeur retournée

                    ; Case $LVN_DELETEALLITEMS 
                    ; Tous les éléments du contrôle sont sur le point d'être supprimés
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_DELETEALLITEMS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; Return True ; Pour supprimer les messages ultérieurs $LVN_DeleteItem
                    ; ; Return False ; Pour recevoir ultérieurement les messages $LVN_DELETEITEM

                    ; Case $LVN_DELETEITEM 
                    ; Un élément est sur le point d'étre effacé
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_DELETEITEM" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; ; No return value

                    ; Case $LVN_ENDLABELEDIT 
                    ; La fin de l'édition d'une étiquette pour un élément
                    ; $tInfo = DllStructCreate($tagNMLVDISPINFO, $lParam)
                    ; $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
                    ; _DebugPrint("$LVN_ENDLABELEDIT" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @CRLF & _
                    ; "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @CRLF & _
                    ; "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @CRLF & _
                    ; "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @CRLF & _
                    ; "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @CRLF & _
                    ; "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @CRLF & _
                    ; "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @CRLF & _
                    ; "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @CRLF & _
                    ; "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
                    ; ; Si Text n'est pas vide, retourne True pour définir l'étiquette de l'élément avec le texte édité, retourne false pour le rejeter
                    ; ; Si Text est vide la valeur retournée est ignorée
                    ; Return True

                    ; Case $LVN_ENDSCROLL 
                    ; Une opération de défilement se termine, Minimum OS WinXP
                    ; $tInfo = DllStructCreate($tagNMLVSCROLL, $lParam)
                    ; _DebugPrint("$LVN_ENDSCROLL" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @CRLF & _
                    ; "-->DY:" & @TAB & DllStructGetData($tInfo, "DY"))
                    ; ; Aucune valeur retournée

                    ; Case $LVN_GETDISPINFO 
                    ; Fournit les informations nécessaires pour afficher ou trier les éléments d'un ListView
                    ; $tInfo = DllStructCreate($tagNMLVDISPINFO, $lParam)
                    ; $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
                    ; _DebugPrint("$LVN_GETDISPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @CRLF & _
                    ; "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @CRLF & _
                    ; "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @CRLF & _
                    ; "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @CRLF & _
                    ; "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @CRLF & _
                    ; "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @CRLF & _
                    ; "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @CRLF & _
                    ; "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @CRLF & _
                    ; "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
                    ; ; Aucune valeur retournée

                    ; Case $LVN_GETINFOTIP 
                    ; Envoyé par un contrôle ListView de style large icône qui a le style étendu $LVS_EX_INFOTIP
                    ; $tInfo = DllStructCreate($tagNMLVGETINFOTIP, $lParam)
                    ; $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
                    ; _DebugPrint("$LVN_GETINFOTIP" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags") & @CRLF & _
                    ; "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @CRLF & _
                    ; "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam"))
                    ; ; -No return value

                    ; Case $LVN_HOTTRACK 
                    ; Envoyé par un contrôle ListView quand l'utilisateur déplace la souris sur l'élément
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_HOTTRACK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; Return 0 ; allow the list view to perform its normal track select processing.
                    ; ; Return 1 ; L'élément ne sera pas sélectionné.

                    ; Case $LVN_INSERTITEM 
                    ; Un nouvel élément a été inséré
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_INSERTITEM" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; ; Aucune valeur retournée

                    ; Case $LVN_ITEMACTIVATE 
                    ; Envoyé par un contrôle ListView quand l'utilisateur active un élément
                    ; $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    ; _DebugPrint("$LVN_ITEMACTIVATE" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _
                    ; "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
                    ; Return 0

                    ; Case $LVN_ITEMCHANGED 
                    ; Un élément a changé
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_ITEMCHANGED" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; ; Aucune valeur retournée

                    ; Case $LVN_ITEMCHANGING 
                    ; Un élément est en train de changer
                    ; $tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
                    ; _DebugPrint("$LVN_ITEMCHANGING" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                    ; "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                    ; "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                    ; "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                    ; "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
                    ; Return True ; prevent the change
                    ; ; Return False ; Autorise le changement

                Case $LVN_KEYDOWN 
                    ; Une touche a été pressée
                    $tInfo = DllStructCreate($tagNMLVKEYDOWN, $lParam)
                    _DebugPrint("$LVN_KEYDOWN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @CRLF & _
                            "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags"))
                    ; Aucune valeur retournée

                    ; Case $LVN_MARQUEEBEGIN 
                    ; La sélection d'un cadre de délimitation a commencé
                    ; _DebugPrint("$LVN_MARQUEEBEGIN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode)
                    ; Return 0 ; Accepte le message
                    ; ; Return 1 ; Arrête la sélection du cadre de délimitation

                    ; Case $LVN_SETDISPINFO 
                    ; Met à jour les informations qu'il conserve pour un élément
                    ; $tInfo = DllStructCreate($tagNMLVDISPINFO, $lParam)
                    ; $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
                    ; _DebugPrint("$LVN_SETDISPINFO" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode & @CRLF & _
                    ; "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @CRLF & _
                    ; "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @CRLF & _
                    ; "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                    ; "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @CRLF & _
                    ; "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @CRLF & _
                    ; "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @CRLF & _
                    ; "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @CRLF & _
                    ; "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @CRLF & _
                    ; "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @CRLF & _
                    ; "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @CRLF & _
                    ; "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @CRLF & _
                    ; "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @CRLF & _
                    ; "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
                    ; ; Aucune valeur retournée

                Case $NM_CLICK 
                    ; Envoyé par un contrôle ListView quand l'utillisateur clique sur un élément avec le bouton gauche de la souris
                    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    _DebugPrint("$NM_CLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _
                            "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                            "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                            "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                            "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                            "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                            "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                            "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _
                            "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
                    ; Aucune valeur retournée

                Case $NM_DBLCLK 
                    ; Envoyé par un contrôle ListView quand l'utilisateur double-clique sur un élément avec le bouton gauche de la souris
                    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    _DebugPrint("$NM_DBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _
                            "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                            "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                            "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                            "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                            "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                            "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                            "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _
                            "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
                    ; Aucune valeur retournée

                    ; Case $NM_HOVER 
                    ; Envoyé par un contrôle ListView quand la souris survole un élément
                    ; _DebugPrint("$NM_HOVER" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                    ; "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                    ; "-->Code:" & @TAB & $iCode)
                    ; Return 0 ; traite le survol normalement
                    ; ; Return 1 ; Empêche le survol d'être traité

                Case $NM_KILLFOCUS 
                    ; Le contrôle a perdu le focus d'entrée
                    _DebugPrint("$NM_KILLFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode)
                    ; Aucune valeur retournée

                Case $NM_RCLICK 
                    ; Envoyé par un contrôle ListView quand l'utilisateur clique sur un élément avec le bouton droit de la souris
                    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    _DebugPrint("$NM_RCLICK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _
                            "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                            "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                            "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                            "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                            "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                            "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                            "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _
                            "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
                    ; Return 1 ; pour interdire  le traitement par défaut
                    Return 0 ; permet le traitement par défaut

                Case $NM_RDBLCLK 
                    ; Envoyé par un contrôle ListView quand l'utilisateur double-clique sur un élément avec le bouton droit de la souris
                    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
                    _DebugPrint("$NM_RDBLCLK" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode & @CRLF & _
                            "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @CRLF & _
                            "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @CRLF & _
                            "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @CRLF & _
                            "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @CRLF & _
                            "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @CRLF & _
                            "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @CRLF & _
                            "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @CRLF & _
                            "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @CRLF & _
                            "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
                    ; Aucune valeur retournée

                Case $NM_RETURN 
                    ; Le contrôle a le focus et l'utilisateur a pressé la touche ENTER
                    _DebugPrint("$NM_RETURN" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode)
                    ; Aucune valeur retournée

                Case $NM_SETFOCUS ; Le contrôle a reçu le focus d'entrée
                    _DebugPrint("$NM_SETFOCUS" & @CRLF & "--> hWndFrom:" & @TAB & $hWndFrom & @CRLF & _
                            "-->IDFrom:" & @TAB & $iIDFrom & @CRLF & _
                            "-->Code:" & @TAB & $iCode)
                    ; Aucune valeur retournée
            EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_NOTIFY

Func _DebugPrint($s_Text, $sLine = @ScriptLineNumber)
    ConsoleWrite( _
            "!===========================================================" & @CRLF & _
            "+======================================================" & @CRLF & _
            "-->Line(" & StringFormat("%04d", $sLine) & "):" & @TAB & $s_Text & @CRLF & _
            "+======================================================" & @CRLF)
EndFunc   ;==>_DebugPrint