Bilder Listview

  • Hallo zusammen,

    ich versuche grade ein Listview zu erstellen das in etwa so aussieht
     [Blockierte Grafik: http://img593.imageshack.us/img593/1108/screenkv.png]

    Hierbei ist mir wirklich nur der markierte Bereich wichtig, die Checkboxen dabei wären toll sind aber nicht notwendig, ich habe mir schon einige Beispiele für Listview mit icons angesehen aber keine Möglichkeit gefunden diese zu vergrößern.

    Hoffe Jemand hat da eine Idee

    Danke im Vorraus^^

  • Schau dir mal die Hilfe zu _GUICtrlListView_SetImageList an.

    Wie gesagt, habe ich mir schon angeguckt aber keine Möglichkeit gefunden die icons größer zu bekommen. (Wenn ich bei _GuictrlListview_setImageList den Type auf 0 setze (große Icons) kommt überhaupt nichts mehr)

    • Offizieller Beitrag

    Dazu habe ich dir vorhin was in der SB geschrieben.
    Beim Erstellen der Imagelist (_GUIImageList_Create) kannst du das Format angeben, welches du verwenden willst.
    Beispiel aus der Hilfe, es wird aber anstatt 16x16, 32x32 verwendet.

    Spoiler anzeigen
    [autoit]

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

    [/autoit] [autoit][/autoit] [autoit]

    $Debug_LV = False ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

    [/autoit] [autoit][/autoit] [autoit]

    Global $hListView

    [/autoit] [autoit][/autoit] [autoit]

    _Main()

    [/autoit] [autoit][/autoit] [autoit]

    Func _Main()

    [/autoit] [autoit][/autoit] [autoit]

    Local $GUI, $hImage
    $GUI = GUICreate("(UDF Created) ListView Create", 400, 300)

    [/autoit] [autoit][/autoit] [autoit]

    $hListView = _GUICtrlListView_Create($GUI, "", 2, 2, 394, 268)
    _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR( $LVS_EX_FULLROWSELECT,$LVS_ICON ))
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    [/autoit] [autoit][/autoit] [autoit]

    ; Load images
    $hImage = _GUIImageList_Create(32,32,5)
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0xFF0000, 32, 32))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x00FF00, 32, 32))
    _GUIImageList_Add($hImage, _GUICtrlListView_CreateSolidBitMap($hListView, 0x0000FF, 32, 32))
    _GUICtrlListView_SetImageList($hListView, $hImage, 1)

    [/autoit] [autoit][/autoit] [autoit]

    ; Add columns
    _GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100)
    _GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100)
    _GUICtrlListView_InsertColumn($hListView, 2, "Column 3", 100)

    [/autoit] [autoit][/autoit] [autoit]

    ; Add items
    _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0)
    _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1)
    _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2)
    _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1)
    _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2)

    [/autoit] [autoit][/autoit] [autoit]

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
    EndFunc ;==>_Main

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    ;~ Local $tBuffer
    $hWndListView = $hListView
    If Not IsHWnd($hListView) Then $hWndListView = GUICtrlGetHandle($hListView)

    [/autoit] [autoit][/autoit] [autoit]

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hWndListView
    Switch $iCode
    ;~ Case $LVN_BEGINDRAG ; A drag-and-drop operation involving the left mouse button is being initiated
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_BEGINDRAG" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ ; No return value
    ;~ Case $LVN_BEGINLABELEDIT ; Start of label editing for an item
    ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam)
    ;~ _DebugPrint("$LVN_BEGINLABELEDIT" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _
    ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _
    ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _
    ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _
    ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _
    ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _
    ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
    ;~ Return False ; Allow the user to edit the label
    ;~ ;Return True ; Prevent the user from editing the label
    ;~ Case $LVN_BEGINRDRAG ; A drag-and-drop operation involving the right mouse button is being initiated
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_BEGINRDRAG" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ ; No return value
    ;~ Case $LVN_BEGINSCROLL ; A scrolling operation starts, Minium OS WinXP
    ;~ $tInfo = DllStructCreate($tagNMLVSCROLL, $ilParam)
    ;~ _DebugPrint("$LVN_BEGINSCROLL" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @LF & _
    ;~ "-->DY:" & @TAB & DllStructGetData($tInfo, "DY"))
    ;~ ; No return value
    Case $LVN_COLUMNCLICK ; A column was clicked
    $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    _DebugPrint("$LVN_COLUMNCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ; No return value
    ;~ Case $LVN_DELETEALLITEMS ; All items in the control are about to be deleted
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_DELETEALLITEMS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ Return True ; To suppress subsequent $LVN_DELETEITEM messages
    ;~ ;Return False ; To receive subsequent $LVN_DELETEITEM messages
    ;~ Case $LVN_DELETEITEM ; An item is about to be deleted
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_DELETEITEM" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ ; No return value
    ;~ Case $LVN_ENDLABELEDIT ; The end of label editing for an item
    ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam)
    ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
    ;~ _DebugPrint("$LVN_ENDLABELEDIT" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _
    ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _
    ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _
    ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _
    ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _
    ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _
    ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _
    ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _
    ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
    ;~ ; If Text is not empty, return True to set the item's label to the edited text, return false to reject it
    ;~ ; If Text is empty the return value is ignored
    ;~ Return True
    ;~ Case $LVN_ENDSCROLL ; A scrolling operation ends, Minium OS WinXP
    ;~ $tInfo = DllStructCreate($tagNMLVSCROLL, $ilParam)
    ;~ _DebugPrint("$LVN_ENDSCROLL" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->DX:" & @TAB & DllStructGetData($tInfo, "DX") & @LF & _
    ;~ "-->DY:" & @TAB & DllStructGetData($tInfo, "DY"))
    ;~ ; No return value
    ;~ Case $LVN_GETDISPINFO ; Provide information needed to display or sort a list-view item
    ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam)
    ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
    ;~ _DebugPrint("$LVN_GETDISPINFO" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _
    ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _
    ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _
    ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _
    ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _
    ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _
    ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _
    ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _
    ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
    ;~ ; No return value
    ;~ Case $LVN_GETINFOTIP ; Sent by a large icon view list-view control that has the $LVS_EX_INFOTIP extended style
    ;~ $tInfo = DllStructCreate($tagNMLVGETINFOTIP, $ilParam)
    ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
    ;~ _DebugPrint("$LVN_GETINFOTIP" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags") & @LF & _
    ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _
    ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam"))
    ;~ ; No return value
    ;~ Case $LVN_HOTTRACK ; Sent by a list-view control when the user moves the mouse over an item
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_HOTTRACK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ Return 0 ; allow the list view to perform its normal track select processing.
    ;~ ;Return 1 ; the item will not be selected.
    ;~ Case $LVN_INSERTITEM ; A new item was inserted
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_INSERTITEM" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ ; No return value
    ;~ Case $LVN_ITEMACTIVATE ; Sent by a list-view control when the user activates an item
    ;~ $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    ;~ _DebugPrint("$LVN_ITEMACTIVATE" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    ;~ "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ;~ Return 0
    ;~ Case $LVN_ITEMCHANGED ; An item has changed
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_ITEMCHANGED" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ ; No return value
    ;~ Case $LVN_ITEMCHANGING ; An item is changing
    ;~ $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    ;~ _DebugPrint("$LVN_ITEMCHANGING" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    ;~ "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    ;~ "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    ;~ "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    ;~ "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param"))
    ;~ Return True ; prevent the change
    ;~ ;Return False ; allow the change
    Case $LVN_KEYDOWN ; A key has been pressed
    $tInfo = DllStructCreate($tagNMLVKEYDOWN, $ilParam)
    _DebugPrint("$LVN_KEYDOWN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->VKey:" & @TAB & DllStructGetData($tInfo, "VKey") & @LF & _
    "-->Flags:" & @TAB & DllStructGetData($tInfo, "Flags"))
    ; No return value
    ;~ Case $LVN_MARQUEEBEGIN ; A bounding box (marquee) selection has begun
    ;~ _DebugPrint("$LVN_MARQUEEBEGIN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode)
    ;~ Return 0 ; accept the message
    ;~ ;Return 1 ; quit the bounding box selection
    ;~ Case $LVN_SETDISPINFO ; Update the information it maintains for an item
    ;~ $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam)
    ;~ $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
    ;~ _DebugPrint("$LVN_SETDISPINFO" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode & @LF & _
    ;~ "-->Mask:" & @TAB & DllStructGetData($tInfo, "Mask") & @LF & _
    ;~ "-->Item:" & @TAB & DllStructGetData($tInfo, "Item") & @LF & _
    ;~ "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    ;~ "-->State:" & @TAB & DllStructGetData($tInfo, "State") & @LF & _
    ;~ "-->StateMask:" & @TAB & DllStructGetData($tInfo, "StateMask") & @LF & _
    ;~ "-->Text:" & @TAB & DllStructGetData($tBuffer, "Text") & @LF & _
    ;~ "-->TextMax:" & @TAB & DllStructGetData($tInfo, "TextMax") & @LF & _
    ;~ "-->Image:" & @TAB & DllStructGetData($tInfo, "Image") & @LF & _
    ;~ "-->Param:" & @TAB & DllStructGetData($tInfo, "Param") & @LF & _
    ;~ "-->Indent:" & @TAB & DllStructGetData($tInfo, "Indent") & @LF & _
    ;~ "-->GroupID:" & @TAB & DllStructGetData($tInfo, "GroupID") & @LF & _
    ;~ "-->Columns:" & @TAB & DllStructGetData($tInfo, "Columns") & @LF & _
    ;~ "-->pColumns:" & @TAB & DllStructGetData($tInfo, "pColumns"))
    ;~ ; No return value
    Case $NM_CLICK ; Sent by a list-view control when the user clicks an item with the left mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_CLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ; No return value
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_DBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ; No return value
    ;~ Case $NM_HOVER ; Sent by a list-view control when the mouse hovers over an item
    ;~ _DebugPrint("$NM_HOVER" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    ;~ "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    ;~ "-->Code:" & @TAB & $iCode)
    ;~ Return 0 ; process the hover normally
    ;~ ;Return 1 ; prevent the hover from being processed
    Case $NM_KILLFOCUS ; The control has lost the input focus
    _DebugPrint("$NM_KILLFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; No return value
    Case $NM_RCLICK ; Sent by a list-view control when the user clicks an item with the right mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_RCLICK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ;Return 1 ; not to allow the default processing
    Return 0 ; allow the default processing
    Case $NM_RDBLCLK ; Sent by a list-view control when the user double-clicks an item with the right mouse button
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    _DebugPrint("$NM_RDBLCLK" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode & @LF & _
    "-->Index:" & @TAB & DllStructGetData($tInfo, "Index") & @LF & _
    "-->SubItem:" & @TAB & DllStructGetData($tInfo, "SubItem") & @LF & _
    "-->NewState:" & @TAB & DllStructGetData($tInfo, "NewState") & @LF & _
    "-->OldState:" & @TAB & DllStructGetData($tInfo, "OldState") & @LF & _
    "-->Changed:" & @TAB & DllStructGetData($tInfo, "Changed") & @LF & _
    "-->ActionX:" & @TAB & DllStructGetData($tInfo, "ActionX") & @LF & _
    "-->ActionY:" & @TAB & DllStructGetData($tInfo, "ActionY") & @LF & _
    "-->lParam:" & @TAB & DllStructGetData($tInfo, "lParam") & @LF & _
    "-->KeyFlags:" & @TAB & DllStructGetData($tInfo, "KeyFlags"))
    ; No return value
    Case $NM_RETURN ; The control has the input focus and that the user has pressed the ENTER key
    _DebugPrint("$NM_RETURN" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; No return value
    Case $NM_SETFOCUS ; The control has received the input focus
    _DebugPrint("$NM_SETFOCUS" & @LF & "--> hWndFrom:" & @TAB & $hWndFrom & @LF & _
    "-->IDFrom:" & @TAB & $iIDFrom & @LF & _
    "-->Code:" & @TAB & $iCode)
    ; No return value
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

    [/autoit] [autoit][/autoit] [autoit]

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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit]
  • Das Problem ist das das nicht im
    $LVS_ICON Style funktioniert, dort werden dann gar keine Icons / Bilder mehr angezeigt.

  • Probiere es mal damit:

    Spoiler anzeigen
    [autoit]


    ;Original code by Jayson -> http://www.autoitscript.com/forum/topic/12…ls/#entry888097
    ;Modified by UEZ 2012
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <File.au3>
    #Include <EditConstants.au3>
    #Include <Constants.au3>
    #include <GuiListView.au3>
    #include <GuiImageList.au3>
    #include <GDIPlus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $sExtFilter = "bmp|gif|jpeg|jpg|png|tif|tiff"
    Global $hGui, $hGui_Preview, $hGui_PreviewSize, $idPic, $idLabel_Info, $Path, $BRowse, $LV, $Pic, $hLV, $aCtrl, $show, $FSF, $timer, $file_prev, $off = False
    Global $hImageList, $sCur, $sLast, $iDX, $iPicState = 0, $DoubleClick = -1
    _GDIPlus_Startup()
    $hGui = GUICreate("Image Viewer", 490, 620)
    $Path = GUICtrlCreateInput("", 10, 10, 400, 20, $ES_READONLY)
    $BRowse = GUICtrlCreateButton("Browse", 420, 10, 60, 20)
    $LV = GUICtrlCreateListView("", 5, 40, 480, 575, -1, BitOr($WS_EX_CLIENTEDGE, $LVS_EX_DOUBLEBUFFER))
    _GUICtrlListView_SetView($LV, 1)
    _GUICtrlListView_SetIconSpacing($LV, 75, 60)
    $hLV = GUICtrlGetHandle($LV)
    $Pic = GUICtrlCreatePic("", 200, 80, 440, 440)
    GUISetState(@SW_SHOW, $hGui)
    $hGui_PreviewSize = 300
    $hGui_Preview = GUICreate("", $hGui_PreviewSize, $hGui_PreviewSize + 58, -1, -1, $WS_POPUP + $WS_BORDER, $WS_EX_TOPMOST, $hGui)
    $idPic = GUICtrlCreatePic("", 0, 0, $hGui_PreviewSize, $hGui_PreviewSize)
    $idLabel_Info = GUICtrlCreateLabel("" , 0, $hGui_PreviewSize + 8, $hGui_PreviewSize * 2, 50)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial", 5)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, 0x222222)
    GUISetState(@SW_HIDE, $hGui_Preview)

    [/autoit] [autoit][/autoit] [autoit]

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")

    [/autoit] [autoit][/autoit] [autoit]

    $show = False
    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    _GDIPlus_Shutdown()
    Exit
    Case $Browse
    If _Browse() Then $show = True
    EndSwitch
    If $show Then StartPreview()
    If Not WinActive($hGui) Then WinActivate($hGui)
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    Func StartPreview()
    Local $hBmp_Tmp, $file, $iIndex
    $iIndex = _GUICtrlListView_GetSelectedIndices($hLV)
    $file = $FSF & _GUICtrlListView_GetItemText($hLV, $iIndex)
    Local $aPos = _GUICtrlListView_GetItemPosition($hLV, $iIndex)
    If TimerDiff($timer) < 5000 Then
    If $file_prev <> $file Then
    $hBmp_Tmp = _GetImage($file, $hGui_PreviewSize)
    _hBmpToPicControl($idPic, $hBmp_Tmp, 1)
    WinMove($hGui_Preview, "", $aPos[0] + $hGui_PreviewSize / 5, Min(@DesktopHeight - ($hGui_PreviewSize + 130), $aPos[1]), $hGui_PreviewSize, $hGui_PreviewSize + 58, 1)
    GUISetState(@SW_SHOW, $hGui_Preview)
    $file_prev = $file
    $off = False
    EndIf
    Else
    If Not $off Then
    GUISetState(@SW_HIDE, $hGui_Preview)
    $off = True
    EndIf
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Min($a, $b)
    If $a < $b Then Return $a
    Return $b
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Browse()
    Local $FL2A, $hBmp, $iCnt = 0
    $FSF = FileSelectFolder("Browse for folder containing pictures", "", "", $hGui)
    If Not @error And FileExists($FSF) Then
    If StringRight($FSF, 1) <> "\" Then $FSF &= "\"
    $FL2A = _FileListToArray($FSF, "*", 1)
    If Not @Error Then
    If IsPtr($hImageList) Then
    _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($LV))
    _GUiImageList_Destroy($hImageList)
    $hImageList = ""
    _hBmpToPicControl($Pic, $hBmp)
    GUICtrlSetImage($Pic, "")
    $iDX = -1
    $iPicState = 0
    $sCur = ""
    $sLast = ""
    EndIf
    $hImageList = _GUiImageList_Create(60, 60, 5, 3)
    _GUICtrlListView_SetImageList($LV, $hImageList, 0)
    For $i = 1 To $FL2A[0]
    If StringRegExp($FL2A[$i], "(?i)\.(" & $sExtFilter & ")", 0) Then
    $hBmp = _GetImage($FSF & $FL2A[$i], 60)
    _GUiImageList_Add($hImageList, $hBmp)
    _WinAPI_DeleteObject($hBmp)
    _GUICtrlListView_AddItem($LV, $FL2A[$i], $iCnt)
    _GUICtrlListView_SetItemImage($LV, $iCnt, $iCnt)
    $iCnt += 1
    EndIf
    Next
    GUICtrlSetData($Path, $FSF)
    EndIf
    WinSetTitle($hGui, "", "Images Found: " & $iCnt)
    Return True
    Else
    If $FSF = "" Then $show = False
    Return SetError(1, 0, False)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetImage($sFile, $iWH, $iBkClr = 0xFFFFFF)
    Local $hBmp1, $hBitmap, $hGraphic, $hImage, $iW, $iH, $aGS, $hBmp2, $aFTS
    $aFTS = FileGetTime($sFile)
    If @error Then Return SetError(1, 0, 0)
    $hBmp1 = _WinAPI_CreateBitmap($iWH, $iWH, 1, 32)
    $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hBmp1)
    $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _WinAPI_DeleteObject($hBmp1)
    _GDIPlus_GraphicsClear($hGraphic, BitOR(0xFF000000, $iBkClr))
    $hImage = _GDIPlus_ImageLoadFromFile($sFile)
    $iW = _GDIPlus_ImageGetWidth($hImage)
    $iH = _GDIPlus_ImageGetHeight($hImage)
    GUICtrlSetData($idLabel_Info, $sFile & @LF & Round(FileGetSize($sFile) / 1024, 0) & " kb (" & $iW & " x " & $iH & ")" & @LF & $aFTS[0] & "/" & $aFTS[1] & "/" & $aFTS[2] & " " & $aFTS[3] & ":" & $aFTS[4] & ":" &$aFTS[5])
    $aGS = _GetScale($iW, $iH, $iWH)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage, $aGS[0], $aGS[1], $aGS[2], $aGS[3])
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    $hBmp2 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    Return $hBmp2
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GetScale($iW, $iH, $iWH)
    Local $aRet[4]
    If $iW <= $iWH And $iH <= $iWH Then
    $aRet[2] = $iW
    $aRet[3] = $iH
    $aRet[0] = ($iWH - $aRet[2])/2
    $aRet[1] = ($iWH - $aRet[3])/2
    ElseIf $iW > $iH Then
    $aRet[2] = $iWH
    $aRet[3] = $iH/($iW/$iWH)
    $aRet[0] = 0
    $aRet[1] = ($iWH - $aRet[3])/2
    ElseIf $iW < $iH Then
    $aRet[2] = $iW/($iH/$iWH)
    $aRet[3] = $iWH
    $aRet[0] = ($iWH - $aRet[2])/2
    $aRet[1] = 0
    ElseIf $iW = $iH Then
    $aRet[2] = $iWH
    $aRet[3] = $iWH
    $aRet[0] = 0
    $aRet[1] = 0
    EndIf
    Return $aRet
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _hBmpToPicControl($iCID, ByRef $hBmp, $iFlag = 0)
    Local Const $STM_SETIMAGE = 0x0172
    Local Const $IMAGE_BITMAP = 0
    Local $hOldBmp
    $hOldBmp = GUICtrlSendMsg($iCID, $STM_SETIMAGE, $IMAGE_BITMAP, $hBmp)
    If $hOldBmp Then _WinAPI_DeleteObject($hOldBmp)
    If $iFlag Then _WinAPI_DeleteObject($hBmp)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo, $tInfo2, $aIDX
    $hWndListView = GUICtrlGetHandle($LV)
    $tNMHDR = DllStructCreate('hwnd hWndFrom;int_ptr IDFrom;int Code', $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    $tInfo = DllStructCreate('hwnd hWndFrom;int_ptr IDFrom;int Code;int_ptr VKey;int Flags', $ilParam)
    $tInfo2 = DllStructCreate($tagNMLISTVIEW, $ilParam)
    Switch $hWndFrom
    Case $hWndListView
    Switch $iCode
    Case $NM_CLICK
    $iDX = _GUICtrlListView_GetNextItem($hWndListView)
    $timer = TimerInit()
    Case $NM_DBLCLK
    $DoubleClick = _GUICtrlListView_GetNextItem($hWndListView)
    $timer = TimerInit()
    Case $LVN_KEYDOWN
    Switch BitAnd(DllStructGetData($tInfo, "VKey"), 0xFFFF)
    Case $VK_UP
    $iDX = _GUICtrlListView_GetNextItem($hWndListView) -1
    If $iDX < 0 Then $iDX = 0
    Case $VK_DOWN
    $iDX = _GUICtrlListView_GetNextItem($hWndListView) + 1
    If $iDX >= _GUICtrlListView_GetItemCount($hWndListView) Then $iDX -= 1
    EndSwitch
    $timer = TimerInit()
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc

    [/autoit]

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯