1) cet exemple se base principalement sur le contrôle total de la listview.
2) Comment ça fonctionne?==> faites seulement un clique droit dans la listview et c'est parti. (vous pouvez faire un double clique aussi)
3) l'exemple peut être largement ameliorer afin d'etre plus utile.(synchroniser les données, les stocker...)
4) le fichier joint oFile.au3 se trouve dans la rubrique UDF..
#include-once
#include <GUIConstantsEx.au3>
#include <GuiMenu.au3>
#include <StructureConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WinAPIShPath.au3>
#include <WinAPIDlg.au3>
#include <String.au3>
#include <Misc.au3>
#include <WinAPIGdi.au3>
#include <WinAPISys.au3>
#include "oFile.au3"
Global $Form1 = GUICreate("", 500, 329, 373, 163,-1,$WS_EX_TOOLWINDOW)
_WinAPI_SetWindowText($Form1,"Exemple de Script [Revision de quelques Fonctions] by Numeric")
GUISetBkColor(BitOR(0x9F5800, 0x880F00))
Global $List1 = GUICtrlCreateListView("", 8, 72, 485, 250, BitOR($LVS_EDITLABELS, $LVS_SHOWSELALWAYS, $WS_HSCROLL, $LVS_REPORT, $LVS_SHAREIMAGELISTS))
_GUICtrlListView_SetExtendedListViewStyle($List1, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
GUICtrlSetColor($List1, 0xFFFF00) ;item jaune
GUICtrlSetBkColor($List1, 0x000000) ; arriere plan
GUISetState(@SW_SHOW)
;Menu items ids
Global Enum $eID_Open = 1000, $eID_Copie, $eID_Delete, $eID_Add
Global Const $WinDataSeparatorChar = Opt("GUIDataSeparatorChar")
;File System Object
Global $Object = oFS_Create()
;1000 images de capacité..
Global $hImage = _GUIImageList_Create(20, 20, 5, 1, 4, 1000)
;Image des colonnes
Local $hHeader = _GUICtrlListView_GetHeader(GUICtrlGetHandle($List1))
_GUICtrlHeader_SetBitmapMargin($hHeader, 5)
_GUICtrlHeader_SetUnicodeFormat($hHeader, True)
Local $hImage2 = _GUIImageList_Create(30, 20, 5, 1, 4, 1) ;une image
;Ajout de l'icone
_GUIImageList_AddIcon($hImage2, @SystemDir & "\shell32.dll", 127, True)
_GUICtrlHeader_SetImageList($hHeader, $hImage2)
;Ajuste les colones
_GUICtrlListView_AddColumn($List1, " ")
;_GUICtrlListView_AddColumn($List1, "FilePath")
_GUICtrlListView_SetColumn($List1, 0, "Liste des Fichiers!", ControlGetPos("", "", $List1)[2], -1, 0)
;Dessine un titre
Local $tRECT, $tFont, $hDC
$tRECT = DllStructCreate($tagRECT)
With $tRECT
.Left = 5
.Top = 15
.Right = 494
.Bottom = 55
EndWith
$hDC = _WinAPI_GetDC($Form1)
$tFont = _WinAPI_CreateFont(70, 70, 0, 0, $FW_BOLD, False, False, False, _
$DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial')
$hOldFont = _WinAPI_SelectObject($hDC, $tFont)
_WinAPI_SelectObject($hDC, $hOldFont)
_WinAPI_SetTextColor($hDC, BitOR(0x9F5800, 0x88A000))
_WinAPI_SetBkColor($hDC, _WinAPI_ColorAdjustLuma(0x000000, 10))
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
_WinAPI_DrawText($hDC, "My FileBox !", $tRECT, $DT_CENTER)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop 1
EndSwitch
WEnd
_WinAPI_DeleteObject($hOldFont)
_GUICtrlListView_DeleteAllItems($List1)
_GUIImageList_Remove($hImage)
_GUIImageList_Destroy($hImage)
_GUIImageList_Destroy($hImage2)
$Object = 0
$tRECT = 0
GUICtrlDelete($List1)
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
;Variales du menu
Local $hMenu, $ImID,$hBrush
;Variable de la notification listview
Local $tNMHDR, $hWndFrom, $iCode
Local $hWndListview = $List1
If Not IsHWnd($List1) Then $hWndListview = GUICtrlGetHandle($List1)
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$iCode = DllStructGetData($tNMHDR, "Code")
$hWndFrom = DllStructGetData($tNMHDR, "hWndFrom")
Switch $hWndFrom
Case $hWndListview
Switch $iCode
Case $NM_DBLCLK
Local $aItem = _GUICtrlListView_GetNextItem($hWndListview)
Local $FileInfos = __FileInfos($hWndListview, $aItem)
If $FileInfos = ".exe" Or $FileInfos = "media" Then
ShellExecute(_GUICtrlListView_GetItemText($hWndListview, $aItem))
Else
Local $toLoad = _WinAPI_OpenFileDlg("Ouvrir avec...", @ProgramsDir)
If Not @error Then Run(@ComSpec & "/c Start " & $toLoad)
EndIf
Case $NM_RCLICK ;clique droit dans la listview
;Menu passager...
$hMenu = _GUICtrlMenu_CreatePopup()
$hBrush = _WinAPI_GetSysColorBrush(0x002)
_GUICtrlMenu_SetMenuBackground($hMenu, $hBrush)
;Menu items
_GUICtrlMenu_InsertMenuItem($hMenu, 1, "Open File", $eID_Open)
_GUICtrlMenu_InsertMenuItem($hMenu, 2, "Copy File", $eID_Copie)
_GUICtrlMenu_InsertMenuItem($hMenu, 3, "Delete File", $eID_Delete)
_GUICtrlMenu_InsertMenuItem($hMenu, 0, "Add File", $eID_Add)
;Creation et ajustement des couleurs
$hBmp1 = _WinAPI_CreateSolidBitmap($Form1, 0xFF0000, 11, 11)
$hBmp2 = _WinAPI_CreateSolidBitmap($Form1, _WinAPI_ColorAdjustLuma(0x00FF00, 0), 11, 11)
$hBmp3 = _WinAPI_CreateSolidBitmap($Form1, 0x0000FF, 11, 11)
$hBmp4 = _WinAPI_CreateSolidBitmap($Form1, _WinAPI_ColorAdjustLuma(0x008000, 0), 11, 11)
;Attribution des couleurs aux menus items...
_GUICtrlMenu_SetItemBitmaps($hMenu, 0, $hBmp4, $hBmp4)
_GUICtrlMenu_SetItemBitmaps($hMenu, 1, $hBmp2, $hBmp2)
_GUICtrlMenu_SetItemBitmaps($hMenu, 2, $hBmp3, $hBmp3)
_GUICtrlMenu_SetItemBitmaps($hMenu, 3, $hBmp1, $hBmp1)
;Pistage du menu
$ImID = _GUICtrlMenu_TrackPopupMenu($hMenu, $hWndListview, -1, -1, 1, 1, 2)
;Destruction du controle menu-passager
_GUICtrlMenu_DestroyMenu($hMenu)
Switch $ImID ;Valeur de l'element du menu selectionné
Case $eID_Copie
__aItemInfos($hWndListview, "Copy File")
Case $eID_Open
__aItemInfos($hWndListview, "Open File")
Case $eID_Delete
__aItemInfos($hWndListview, "Delete File")
Case $eID_Add
__aItemInfos($hWndListview, "Add File")
EndSwitch
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
Func __FileInfos($hWndListview, $iIndex)
Local $sFile = ''
;On otient le texte de l'item donc le Chemin du fichier
If IsNumber($iIndex) Then $sFile = _GUICtrlListView_GetItemText($hWndListview, $iIndex)
Local $sType = ''
If _WinAPI_PathFindExtension($sFile) = ".exe" Or _WinAPI_PathFindExtension($sFile) = ".Dat" Then
$sType = ".exe"
Else
;Si le fichier n'est pas un executable, On cherche le type du fichier
Local $getFileType = oFS_GetFileType($Object, $sFile)
Switch $getFileType
Case "audio", "video", "text", "image"
$sType = "media"
Case Else
$sType = "?"
EndSwitch
EndIf
Return $sType
EndFunc ;==>__FileInfos
Func __aItemInfos($hListview, $sMsg)
Local $aItem = _GUICtrlListView_GetNextItem($hListview)
Local $FileInfos = __FileInfos($hListview, $aItem)
Switch $sMsg ;Message du menu passager
Case "Open File"
;Pour ouvrir les fichiers de types prevus
If $FileInfos = ".exe" Or $FileInfos = "media" Then
ShellExecute(_GUICtrlListView_GetItemText($hListview, $aItem))
Else ;Si le type du fichier n'est pas tout a fait prevu, alors on donne la main à l'utilisateur
Local $toLoad = _WinAPI_OpenFileDlg("Ouvrir avec...", @ProgramsDir)
If Not @error Then Run(@ComSpec & "/c Start " & $toLoad)
EndIf
Sleep(100)
;Je fais de mon mieux pour quelques effets....
;Vous pouvez commenter la ligne suivante....
ShellExecute(@SystemDir & "\Bubbles.scr")
Case "Add File"
Local $hOpen = FileOpenDialog("Choisir les fichiers", @DesktopDir, "Tous(*.*)", 4) ;multiselection possible grace au flag 4
Local $PathInfos[2], $MultiFiles = False
If Not @error Then
If StringInStr($hOpen, $WinDataSeparatorChar, 1) Then ;Cas de Plusieurs fichiers selectionnées..
Local $getNames, $getPath
$getPath = _StringBetween($hOpen, "", $WinDataSeparatorChar)
If Not @error And oFS_FolderExists($Object, $getPath[0]) Then
$getPath = $getPath[0]
EndIf
$getNames = StringTrimLeft($hOpen, StringLen($getPath) + 1)
$MultiFiles = True
ElseIf oFS_FileExists($Object, $hOpen) Then ;Cas d'un seul fichier selectionné
$getNames = _WinAPI_PathFindFileName($hOpen)
$getPath = StringTrimRight($hOpen, StringLen($getNames) + 1)
EndIf
$PathInfos[0] = $getPath
$PathInfos[1] = $getNames
Local $iIcone
_GUICtrlListView_BeginUpdate($hListview)
If $MultiFiles Then
Local $PathInfos2 = StringSplit($PathInfos[1], $WinDataSeparatorChar)
For $j = 1 To $PathInfos2[0]
;Ajout des icones et Noms complets des fichiers.
$iIcone = oFS_GetFileIcon($Object, $PathInfos[0] & "\" & $PathInfos2[$j])
_GUIImageList_AddIcon($hImage, $iIcone[0], $iIcone[1], True) ;
_GUICtrlListView_SetImageList($hListview, $hImage, 1)
_GUICtrlListView_AddItem($hListview, $PathInfos[0] & "\" & $PathInfos2[$j], _GUICtrlListView_GetItemCount($hListview))
Next
Else
;Ajout de l'icone et nom complet du seul fichier selectionné
$iIcone = oFS_GetFileIcon($Object, $PathInfos[0] & "\" & $PathInfos[1])
_GUIImageList_AddIcon($hImage, $iIcone[0], $iIcone[1], True) ;
_GUICtrlListView_SetImageList($hListview, $hImage, 1)
_GUICtrlListView_AddItem($hListview, $PathInfos[0] & "\" & $PathInfos[1], _GUICtrlListView_GetItemCount($hListview))
EndIf
_GUICtrlHeader_SetImageList($hHeader, $hImage2)
;Pour plus de precision _WM_PAINT, on redessine les items
_GUICtrlListView_RedrawItems($hListview, 0, _GUICtrlListView_GetItemCount($hListview))
_GUICtrlListView_EndUpdate($hListview)
EndIf
Case "Copy File"
_ClipPutFile(_GUICtrlListView_GetItemText($hListview, $aItem))
Case "Delete File"
_GUICtrlListView_DeleteItem($hListview, $aItem)
EndSwitch
EndFunc ;==>__aItemInfos
#include <GUIConstantsEx.au3>
#include <GuiMenu.au3>
#include <StructureConstants.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WinAPIShPath.au3>
#include <WinAPIDlg.au3>
#include <String.au3>
#include <Misc.au3>
#include <WinAPIGdi.au3>
#include <WinAPISys.au3>
#include "oFile.au3"
Global $Form1 = GUICreate("", 500, 329, 373, 163,-1,$WS_EX_TOOLWINDOW)
_WinAPI_SetWindowText($Form1,"Exemple de Script [Revision de quelques Fonctions] by Numeric")
GUISetBkColor(BitOR(0x9F5800, 0x880F00))
Global $List1 = GUICtrlCreateListView("", 8, 72, 485, 250, BitOR($LVS_EDITLABELS, $LVS_SHOWSELALWAYS, $WS_HSCROLL, $LVS_REPORT, $LVS_SHAREIMAGELISTS))
_GUICtrlListView_SetExtendedListViewStyle($List1, BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES))
GUICtrlSetColor($List1, 0xFFFF00) ;item jaune
GUICtrlSetBkColor($List1, 0x000000) ; arriere plan
GUISetState(@SW_SHOW)
;Menu items ids
Global Enum $eID_Open = 1000, $eID_Copie, $eID_Delete, $eID_Add
Global Const $WinDataSeparatorChar = Opt("GUIDataSeparatorChar")
;File System Object
Global $Object = oFS_Create()
;1000 images de capacité..
Global $hImage = _GUIImageList_Create(20, 20, 5, 1, 4, 1000)
;Image des colonnes
Local $hHeader = _GUICtrlListView_GetHeader(GUICtrlGetHandle($List1))
_GUICtrlHeader_SetBitmapMargin($hHeader, 5)
_GUICtrlHeader_SetUnicodeFormat($hHeader, True)
Local $hImage2 = _GUIImageList_Create(30, 20, 5, 1, 4, 1) ;une image
;Ajout de l'icone
_GUIImageList_AddIcon($hImage2, @SystemDir & "\shell32.dll", 127, True)
_GUICtrlHeader_SetImageList($hHeader, $hImage2)
;Ajuste les colones
_GUICtrlListView_AddColumn($List1, " ")
;_GUICtrlListView_AddColumn($List1, "FilePath")
_GUICtrlListView_SetColumn($List1, 0, "Liste des Fichiers!", ControlGetPos("", "", $List1)[2], -1, 0)
;Dessine un titre
Local $tRECT, $tFont, $hDC
$tRECT = DllStructCreate($tagRECT)
With $tRECT
.Left = 5
.Top = 15
.Right = 494
.Bottom = 55
EndWith
$hDC = _WinAPI_GetDC($Form1)
$tFont = _WinAPI_CreateFont(70, 70, 0, 0, $FW_BOLD, False, False, False, _
$DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, 'Arial')
$hOldFont = _WinAPI_SelectObject($hDC, $tFont)
_WinAPI_SelectObject($hDC, $hOldFont)
_WinAPI_SetTextColor($hDC, BitOR(0x9F5800, 0x88A000))
_WinAPI_SetBkColor($hDC, _WinAPI_ColorAdjustLuma(0x000000, 10))
_WinAPI_SetBkMode($hDC, $TRANSPARENT)
_WinAPI_DrawText($hDC, "My FileBox !", $tRECT, $DT_CENTER)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop 1
EndSwitch
WEnd
_WinAPI_DeleteObject($hOldFont)
_GUICtrlListView_DeleteAllItems($List1)
_GUIImageList_Remove($hImage)
_GUIImageList_Destroy($hImage)
_GUIImageList_Destroy($hImage2)
$Object = 0
$tRECT = 0
GUICtrlDelete($List1)
Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
;Variales du menu
Local $hMenu, $ImID,$hBrush
;Variable de la notification listview
Local $tNMHDR, $hWndFrom, $iCode
Local $hWndListview = $List1
If Not IsHWnd($List1) Then $hWndListview = GUICtrlGetHandle($List1)
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$iCode = DllStructGetData($tNMHDR, "Code")
$hWndFrom = DllStructGetData($tNMHDR, "hWndFrom")
Switch $hWndFrom
Case $hWndListview
Switch $iCode
Case $NM_DBLCLK
Local $aItem = _GUICtrlListView_GetNextItem($hWndListview)
Local $FileInfos = __FileInfos($hWndListview, $aItem)
If $FileInfos = ".exe" Or $FileInfos = "media" Then
ShellExecute(_GUICtrlListView_GetItemText($hWndListview, $aItem))
Else
Local $toLoad = _WinAPI_OpenFileDlg("Ouvrir avec...", @ProgramsDir)
If Not @error Then Run(@ComSpec & "/c Start " & $toLoad)
EndIf
Case $NM_RCLICK ;clique droit dans la listview
;Menu passager...
$hMenu = _GUICtrlMenu_CreatePopup()
$hBrush = _WinAPI_GetSysColorBrush(0x002)
_GUICtrlMenu_SetMenuBackground($hMenu, $hBrush)
;Menu items
_GUICtrlMenu_InsertMenuItem($hMenu, 1, "Open File", $eID_Open)
_GUICtrlMenu_InsertMenuItem($hMenu, 2, "Copy File", $eID_Copie)
_GUICtrlMenu_InsertMenuItem($hMenu, 3, "Delete File", $eID_Delete)
_GUICtrlMenu_InsertMenuItem($hMenu, 0, "Add File", $eID_Add)
;Creation et ajustement des couleurs
$hBmp1 = _WinAPI_CreateSolidBitmap($Form1, 0xFF0000, 11, 11)
$hBmp2 = _WinAPI_CreateSolidBitmap($Form1, _WinAPI_ColorAdjustLuma(0x00FF00, 0), 11, 11)
$hBmp3 = _WinAPI_CreateSolidBitmap($Form1, 0x0000FF, 11, 11)
$hBmp4 = _WinAPI_CreateSolidBitmap($Form1, _WinAPI_ColorAdjustLuma(0x008000, 0), 11, 11)
;Attribution des couleurs aux menus items...
_GUICtrlMenu_SetItemBitmaps($hMenu, 0, $hBmp4, $hBmp4)
_GUICtrlMenu_SetItemBitmaps($hMenu, 1, $hBmp2, $hBmp2)
_GUICtrlMenu_SetItemBitmaps($hMenu, 2, $hBmp3, $hBmp3)
_GUICtrlMenu_SetItemBitmaps($hMenu, 3, $hBmp1, $hBmp1)
;Pistage du menu
$ImID = _GUICtrlMenu_TrackPopupMenu($hMenu, $hWndListview, -1, -1, 1, 1, 2)
;Destruction du controle menu-passager
_GUICtrlMenu_DestroyMenu($hMenu)
Switch $ImID ;Valeur de l'element du menu selectionné
Case $eID_Copie
__aItemInfos($hWndListview, "Copy File")
Case $eID_Open
__aItemInfos($hWndListview, "Open File")
Case $eID_Delete
__aItemInfos($hWndListview, "Delete File")
Case $eID_Add
__aItemInfos($hWndListview, "Add File")
EndSwitch
EndSwitch
EndSwitch
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
Func __FileInfos($hWndListview, $iIndex)
Local $sFile = ''
;On otient le texte de l'item donc le Chemin du fichier
If IsNumber($iIndex) Then $sFile = _GUICtrlListView_GetItemText($hWndListview, $iIndex)
Local $sType = ''
If _WinAPI_PathFindExtension($sFile) = ".exe" Or _WinAPI_PathFindExtension($sFile) = ".Dat" Then
$sType = ".exe"
Else
;Si le fichier n'est pas un executable, On cherche le type du fichier
Local $getFileType = oFS_GetFileType($Object, $sFile)
Switch $getFileType
Case "audio", "video", "text", "image"
$sType = "media"
Case Else
$sType = "?"
EndSwitch
EndIf
Return $sType
EndFunc ;==>__FileInfos
Func __aItemInfos($hListview, $sMsg)
Local $aItem = _GUICtrlListView_GetNextItem($hListview)
Local $FileInfos = __FileInfos($hListview, $aItem)
Switch $sMsg ;Message du menu passager
Case "Open File"
;Pour ouvrir les fichiers de types prevus
If $FileInfos = ".exe" Or $FileInfos = "media" Then
ShellExecute(_GUICtrlListView_GetItemText($hListview, $aItem))
Else ;Si le type du fichier n'est pas tout a fait prevu, alors on donne la main à l'utilisateur
Local $toLoad = _WinAPI_OpenFileDlg("Ouvrir avec...", @ProgramsDir)
If Not @error Then Run(@ComSpec & "/c Start " & $toLoad)
EndIf
Sleep(100)
;Je fais de mon mieux pour quelques effets....
;Vous pouvez commenter la ligne suivante....
ShellExecute(@SystemDir & "\Bubbles.scr")
Case "Add File"
Local $hOpen = FileOpenDialog("Choisir les fichiers", @DesktopDir, "Tous(*.*)", 4) ;multiselection possible grace au flag 4
Local $PathInfos[2], $MultiFiles = False
If Not @error Then
If StringInStr($hOpen, $WinDataSeparatorChar, 1) Then ;Cas de Plusieurs fichiers selectionnées..
Local $getNames, $getPath
$getPath = _StringBetween($hOpen, "", $WinDataSeparatorChar)
If Not @error And oFS_FolderExists($Object, $getPath[0]) Then
$getPath = $getPath[0]
EndIf
$getNames = StringTrimLeft($hOpen, StringLen($getPath) + 1)
$MultiFiles = True
ElseIf oFS_FileExists($Object, $hOpen) Then ;Cas d'un seul fichier selectionné
$getNames = _WinAPI_PathFindFileName($hOpen)
$getPath = StringTrimRight($hOpen, StringLen($getNames) + 1)
EndIf
$PathInfos[0] = $getPath
$PathInfos[1] = $getNames
Local $iIcone
_GUICtrlListView_BeginUpdate($hListview)
If $MultiFiles Then
Local $PathInfos2 = StringSplit($PathInfos[1], $WinDataSeparatorChar)
For $j = 1 To $PathInfos2[0]
;Ajout des icones et Noms complets des fichiers.
$iIcone = oFS_GetFileIcon($Object, $PathInfos[0] & "\" & $PathInfos2[$j])
_GUIImageList_AddIcon($hImage, $iIcone[0], $iIcone[1], True) ;
_GUICtrlListView_SetImageList($hListview, $hImage, 1)
_GUICtrlListView_AddItem($hListview, $PathInfos[0] & "\" & $PathInfos2[$j], _GUICtrlListView_GetItemCount($hListview))
Next
Else
;Ajout de l'icone et nom complet du seul fichier selectionné
$iIcone = oFS_GetFileIcon($Object, $PathInfos[0] & "\" & $PathInfos[1])
_GUIImageList_AddIcon($hImage, $iIcone[0], $iIcone[1], True) ;
_GUICtrlListView_SetImageList($hListview, $hImage, 1)
_GUICtrlListView_AddItem($hListview, $PathInfos[0] & "\" & $PathInfos[1], _GUICtrlListView_GetItemCount($hListview))
EndIf
_GUICtrlHeader_SetImageList($hHeader, $hImage2)
;Pour plus de precision _WM_PAINT, on redessine les items
_GUICtrlListView_RedrawItems($hListview, 0, _GUICtrlListView_GetItemCount($hListview))
_GUICtrlListView_EndUpdate($hListview)
EndIf
Case "Copy File"
_ClipPutFile(_GUICtrlListView_GetItemText($hListview, $aItem))
Case "Delete File"
_GUICtrlListView_DeleteItem($hListview, $aItem)
EndSwitch
EndFunc ;==>__aItemInfos