1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. DeepRed92

Beiträge von DeepRed92

  • EditLabel in einer ListView

    • DeepRed92
    • 15. Mai 2009 um 20:33

    Wieso funktioniert es hier nicht:

    Spoiler anzeigen
    [autoit]

    Func _WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
    Local $tNMHDR, $event, $hwndFrom, $code, $i_idNew, $dwFlags, $lResult, $idFrom, $i_idOld
    Local $tNMTOOLBAR, $tNMTBHOTITEM, $tInfo
    $hWndListView = $ListView4
    If Not IsHWnd($ListView4) Then $hWndListView = GUICtrlGetHandle($ListView4)

    $tNMHDR = DllStructCreate($tagNMHDR, $lParam)
    $hwndFrom = DllStructGetData($tNMHDR, "hWndFrom")
    $idFrom = DllStructGetData($tNMHDR, "IDFrom")
    $code = DllStructGetData($tNMHDR, "Code")
    Switch $hwndFrom
    Case $hToolbar
    Switch $code
    Case $NM_CLICK
    $tNMACTIVE = DllStructCreate($tagNMITEMACTIVATE, $lParam)
    $iItem = DllStructGetData($tNMACTIVE, "Index")
    If $iItem = -1 Then Return $GUI_RUNDEFMSG
    Switch _GUICtrlToolbar_CommandToIndex($hToolbar, $iItem)
    Case 0
    GUICtrlSendToDummy($Dummy1)
    Case 1
    GUICtrlSendToDummy($Dummy2)
    Case 3
    GUICtrlSendToDummy($Dummy3)
    Case 4
    GUICtrlSendToDummy($Dummy4)
    Case 5
    GUICtrlSendToDummy($Dummy5)
    Case 7
    GUICtrlSendToDummy($Dummy6)
    Case 8
    GUICtrlSendToDummy($Dummy7)
    Case 9
    GUICtrlSendToDummy($Dummy8)
    Case 10
    GUICtrlSendToDummy($Dummy9)
    Case 11
    GUICtrlSendToDummy($Dummy10)
    Case 12
    GUICtrlSendToDummy($Dummy11)
    Case 13
    GUICtrlSendToDummy($Dummy12)
    EndSwitch
    Case $TBN_HOTITEMCHANGE
    $tNMTBHOTITEM = DllStructCreate($tagNMTBHOTITEM, $lParam)
    $i_idOld = DllStructGetData($tNMTBHOTITEM, "idOld")
    $i_idNew = DllStructGetData($tNMTBHOTITEM, "idNew")
    $iItem = $i_idNew
    $dwFlags = DllStructGetData($tNMTBHOTITEM, "dwFlags")
    EndSwitch
    EndSwitch
    Switch $idFrom
    Case $ListView1
    Select
    Case $code = $NM_DBLCLK
    $getselectedplugin1 = _GUICtrlListView_GetSelectionMark($ListView1)
    If $getselectedplugin1 = -1 Then
    Else
    $Selected_Item = _GUICtrlListView_GetItemText($ListView1, $getselectedplugin1)
    If $Selected_Item = "Radiosender" Then
    GUICtrlSetState($ListView2, $GUI_Show)
    GUICtrlSetState($ListView1, $GUI_Hide)
    _Enable_All_Toolbar_Buttons()
    $CurrentDirectory1 = "Radiosender"
    ElseIf $Selected_Item = "Musik" Then
    GUICtrlSetState($ListView3, $GUI_Show)
    GUICtrlSetState($ListView1, $GUI_Hide)
    _Enable_All_Toolbar_Buttons()
    $CurrentDirectory1 = "Musik"
    ElseIf $Selected_Item = "Favouriten" Then
    GUICtrlSetState($ListView4, $GUI_Show)
    GUICtrlSetState($ListView1, $GUI_Hide)
    _Disable_All_Toolbar_Buttons()
    $CurrentDirectory1 = "Favouriten"
    EndIf
    EndIf
    EndSelect
    Case $ListView2
    Select
    Case $code = $NM_DBLCLK
    $getselectedplugin1 = _GUICtrlListView_GetSelectionMark($ListView2)
    If $getselectedplugin1 = -1 Then
    Else
    $Selected_Item = _GUICtrlListView_GetItemTextArray($ListView2)
    _SendData('New_Media("' & $Selected_Item[4] & '"', $Remote_ReceiverID_Name)
    _SendData('_SetStatus("Play")', $Remote_ReceiverID_Name)
    _SendData('SetChannel("' & $Selected_Item[1] & '")', $Remote_ReceiverID_Name)
    EndIf
    EndSelect

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

    Case $ListView3
    Select
    Case $code = $NM_DBLCLK
    $getselectedplugin1 = _GUICtrlListView_GetSelectionMark($ListView3)
    If $getselectedplugin1 = -1 Then
    Else
    $Selected_Item = _GUICtrlListView_GetItemTextArray($ListView3)
    $Path = _GetMusicPathByName($Selected_Item[1])
    _SendData('_SetStatus("Play")', $Remote_ReceiverID_Name)
    _SendData('_RefreshCombos()', $Remote_ReceiverID_Name)
    _SendData('New_Media("' & $Path & '"', $Remote_ReceiverID_Name)
    _SendData('AddStringToPlayer("' & $Selected_Item[1] & '")', $Remote_ReceiverID_Name)
    _SendData('SetChannel("' & $Selected_Item[1] & '")', $Remote_ReceiverID_Name)
    EndIf
    EndSelect
    EndSwitch

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

    Switch $hwndFrom
    Case $hWndListView
    Switch $code
    Case $LVN_ENDLABELEDIT, $LVN_ENDLABELEDITW ; The end of label editing for an item
    $tInfo = DllStructCreate($tagNMLVDISPINFO, $ilParam)
    Local $tBuffer = DllStructCreate("char Text[" & DllStructGetData($tInfo, "TextMax") & "]", DllStructGetData($tInfo, "Text"))
    ; 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 StringLen(DllStructGetData($tBuffer, "Text")) > 0
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>_WM_NOTIFY

    [/autoit]

    Es wird dadurch sofort beenden...und die neuen Werte werden nicht übernommen -.-

  • EditLabel in einer ListView

    • DeepRed92
    • 15. Mai 2009 um 17:10

    Komisch. Ich weiß auch nicht wie man an den eingegebenen Text überhaupt drankommt :huh: .

  • EditLabel in einer ListView

    • DeepRed92
    • 15. Mai 2009 um 14:40

    Was ist denn los? Warum antwortet denn niemand ;(

  • EditLabel in einer ListView

    • DeepRed92
    • 14. Mai 2009 um 21:52

    Hier:

  • EditLabel in einer ListView

    • DeepRed92
    • 14. Mai 2009 um 21:33

    Hat denn niemand eine Idee? ?(

  • Scite stürzt ab

    • DeepRed92
    • 14. Mai 2009 um 13:43

    Hallo,

    wenn ich immer diese Datei öffne (Edit Script) stürzt Scite bei mir immer ab. Ist das bei euch auch so?

  • EditLabel in einer ListView

    • DeepRed92
    • 14. Mai 2009 um 07:59

    Also nochmal. So sieht es bis jetzt aus:

    [Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/11756369131715678.jpg]

    Doch wenn ich Enter drücke wird der Name "Testordner" nicht übernommen. Wie kann man das machen?

  • EditLabel in einer ListView

    • DeepRed92
    • 13. Mai 2009 um 19:12

    Nun es ist ein ListView mit Icons. Wie im Windows Explorer. Ich wollte, wenn man ein neues Item erstellt es sofort editieren können. Das klappt uunächst. Aber wie kann man die im Editfeld eingegebenen Daten übernehmen?

  • EditLabel in einer ListView

    • DeepRed92
    • 13. Mai 2009 um 18:04

    Hallo,

    wenn ich einen ListViewItem editierbar mache, was eingebe und Enter drücke wird das neue Wert nicht übernommen.
    Hier ein Teil des Codes:

    [autoit]

    Switch $idFrom
    Case $ListView4
    Switch $code
    Case $LVN_ENDLABELEDIT, $LVN_ENDLABELEDITW
    $getselectedplugin1 = _GUICtrlListView_GetSelectionMark($ListView4)
    If $getselectedplugin1 = -1 Then
    Else
    MsgBox(0,"","")
    EndIf
    EndSwitch
    EndSwitch

    [/autoit]
  • Fehler

    • DeepRed92
    • 13. Mai 2009 um 16:35

    Hallo,

    kann hier jemand einen Fehler entdecken?

    [autoit]

    Func _GetMusicPathByName($Name)
    $Status = 0
    While 1
    $Status += 1
    $ReadLine = FileReadLine(@ScriptDir & "\Music.txt", $Status)
    If $ReadLine = "" Then ExitLoop
    $StringSplit = StringSplit($ReadLine, "|")
    If $StringSplit[1] = $Name Then
    Return $StringSplit[7]
    EndIf
    WEnd
    EndFunc ;==>_GetMusicPathByName

    [/autoit]

    Es gibt immer den Inhalt 0 zurück. Die Textdatei sieht folgendermaßen aus:

    Code
    B....||00:0...|**...|1... kBit/s|3.... KB|D:\....mp3
    Bo.|Ba....e|00:04:0.|**....|3....t/s|6......KB|D:\......y.mp3
  • Inhalt eines Listviews speichern

    • DeepRed92
    • 12. Mai 2009 um 21:15

    Und wie kann ich einen Eintrag aus der Textdatei löschen? In deinem Script benutzt du _GUICtrlListView_DeleteItemsSelected($hLVHandle). Geht es auch so, das man es direkt abspeichern kann?

  • Inhalt eines Listviews speichern

    • DeepRed92
    • 12. Mai 2009 um 19:12

    Hallo,

    ich hab eine Listview mit folgendem Inhalt:

    [Blockierte Grafik: http://download.lima-city.de/deepred/Bilder/943315865527549899.jpg]

    Wie könnte man den Inhalt am besten abspeichern? Per SQLite oder doch lieber Ini. Geht es auch mit Textdateien?

  • Laufwerksart ermitteln

    • DeepRed92
    • 11. Mai 2009 um 18:18

    Mit DriveGetSize. Diskettenlaufwerke haben ja oft nur 1,44 MB.

  • Dateien unbemerkt versenden

    • DeepRed92
    • 11. Mai 2009 um 13:31

    Dem Nutzer ist es darüber hinaus untersagt, das Online-Spiel (einschließlich aller einzelner Internetseiten) mit anderen Programmen außer dem Internet-Browser oder dem zur Verfügung gestellten Client-Programm aufzurufen. Dies bezieht sich insbesondere auf so genannte Bots sowie andere Tools, die das Webinterface ersetzen oder ergänzen sollen. Ebenfalls untersagt sind Scripte und gänzlich oder zum Teil automatisierte Programme, die dem Nutzer einen Vorteil gegenüber seinen Mitspielern verschaffen. Hierzu zählen auch Auto-Refresh-Funktionen und weitere, integrierte Mechanismen des Internetbrowsers, sofern es sich um automatisierte Vorgänge handelt.

  • Eigenen kleinen Explorer

    • DeepRed92
    • 10. Mai 2009 um 19:50

    Danke AutoBert. Kann man das auch als ListView machen? Fänd ich um einiges besser ^^

  • Laufwerksart ermitteln

    • DeepRed92
    • 10. Mai 2009 um 18:44

    DriveGetType ;)

  • Eigenen kleinen Explorer

    • DeepRed92
    • 10. Mai 2009 um 18:38

    Dank aber ich werd darauß nicht schlau. ?(

  • Eigenen kleinen Explorer

    • DeepRed92
    • 10. Mai 2009 um 17:42

    Also besser ist es natürlich als ListView. Wäre toll wenn es so gehen würde. Nur fällt mir gerade nicht ein wie man sowas speichern könnte...

  • Obfuscator ünnützlich

    • DeepRed92
    • 10. Mai 2009 um 15:57

    Warum wurde dieser Beitrag fast komplett gesperrt?

    http://www.autoitscript.com/forum/index.php?s=94f7d0a07382aa01b385ab7006795f33&showtopic=28323&st=0

  • Drag & Drop innerhalb eines Listviews

    • DeepRed92
    • 10. Mai 2009 um 14:12

    Vielleicht so:

    Spoiler anzeigen
    [autoit]

    #cs ----------------------------------------------------------------------------

    AutoIt Version: 3.3.0.0
    Author: Burak Keskin

    Script Function:
    Template AutoIt script.

    #ce ----------------------------------------------------------------------------

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

    ; Script Start - Add your code below here

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

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

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

    Global $bDragging = False
    Global $iLast_Index = -1
    Global $a_Index[2]; From and to
    Global $iLastLinetop, $iLastLineLeft
    Global $drawing = False; to ensure mousemove doesn't cause more than one line to be drawn

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

    $Main_GUI = GUICreate("Drag & Drop LV Item", 225, 400, -1, -1, BitOR($WS_THICKFRAME, $WS_SIZEBOX))

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

    $ListView = GUICtrlCreateListView("Entry Name|Category", 5, 75, 195, 280, $LVS_SINGLESEL)
    $h_ListView = GUICtrlGetHandle($ListView)

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

    _GUICtrlListView_SetColumnWidth($ListView, 0, 100)
    _GUICtrlListView_SetColumnWidth($ListView, 1, 100)

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

    GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_GRIDLINES, $LVS_EX_GRIDLINES)
    GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT)
    GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_CHECKBOXES, $LVS_EX_CHECKBOXES)

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

    GUICtrlSendMsg($ListView, $LVM_SETEXTENDEDLISTVIEWSTYLE, $LVS_EX_SUBITEMIMAGES, $LVS_EX_SUBITEMIMAGES)

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

    $h_ImageList = _GUIImageList_Create(20, 20, 5, 0, 4, $LVSIL_SMALL)

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

    For $i = 0 To 10
    _GUIImageList_AddIcon($h_ImageList, @SystemDir & "\shell32.dll", $i)
    Next

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

    _GUICtrlListView_SetImageList($h_ListView, $h_ImageList, $LVSIL_SMALL)

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

    For $i = 0 To 9
    GUICtrlCreateListViewItem("Name " & $i & "|Category " & $i, $ListView)
    _GUICtrlListView_SetItemImage($h_ListView, $i, $i, 0); listview handle, index, subitem, image index
    Next

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

    GUISetState()

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

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY_EVENTS")
    GUIRegisterMsg($WM_LBUTTONUP, "WM_LBUTTONUP_EVENTS")
    GUIRegisterMsg($WM_MOUSEMOVE, "WM_MOUSEMOVE_EVENTS")

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    _GUIImageList_Destroy($h_ImageList)
    Exit
    EndSwitch
    WEnd

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

    Func WM_LBUTTONUP_EVENTS($hWndGUI, $MsgID, $wParam, $lParam)
    $bDragging = False

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

    DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $h_ListView, "ptr", 0, "int", 0, "int", 5)
    $iLast_Index = -1

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

    Local $aLV_Pos = ControlGetPos($hWndGUI, "", $ListView)

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

    Local $iX = BitAND($lParam, 0xFFFF) - $aLV_Pos[0]
    Local $iY = BitShift($lParam, 16) - $aLV_Pos[1]

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

    Local $struct_LVHITTESTINFO = DllStructCreate("int;int;uint;int;int;int")

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

    DllStructSetData($struct_LVHITTESTINFO, 1, $iX)
    DllStructSetData($struct_LVHITTESTINFO, 2, $iY)

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

    $a_Index[1] = GUICtrlSendMsg($ListView, $LVM_HITTEST, 0, DllStructGetPtr($struct_LVHITTESTINFO))
    Local $iFlags = DllStructGetData($struct_LVHITTESTINFO, 2)

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

    ;// Out of the ListView?
    If $a_Index[1] == -1 Then Return $GUI_RUNDEFMSG

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

    ;// Not in an item?
    If BitAND($iFlags, $LVHT_ONITEMLABEL) == 0 And BitAND($iFlags, $LVHT_ONITEMSTATEICON) == 0 Then Return $GUI_RUNDEFMSG

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

    If $a_Index[0] <> $a_Index[1] Then
    ;ConsoleWrite($a_Index[0] & " ==> " & $a_Index[1] & @CRLF)
    _GUICtrlListView_CopyItem($h_ListView, $h_ListView, $a_Index[0], $a_Index[1], 1)
    EndIf

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

    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_LBUTTONUP_EVENTS

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

    Func WM_MOUSEMOVE_EVENTS($hWndGUI, $MsgID, $wParam, $lParam)
    If Not $bDragging Or $drawing Then Return $GUI_RUNDEFMSG

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

    Local $aLV_Pos = ControlGetPos($hWndGUI, "", $ListView)

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

    Local $iX = BitAND($lParam, 0xFFFF) - $aLV_Pos[0]
    Local $iY = BitShift($lParam, 16) - $aLV_Pos[1]

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

    Local $struct_LVHITTESTINFO = DllStructCreate("int;int;uint;int;int;int")

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

    DllStructSetData($struct_LVHITTESTINFO, 1, $iX)
    DllStructSetData($struct_LVHITTESTINFO, 2, $iY)

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

    Local $iItem = GUICtrlSendMsg($ListView, $LVM_HITTEST, 0, DllStructGetPtr($struct_LVHITTESTINFO))
    If $iItem = -1 Then Return $GUI_RUNDEFMSG

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

    If $iLast_Index = $iItem Then Return $GUI_RUNDEFMSG

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

    If $iLast_Index > $iItem Then;Move up
    _GUICtrlListView_RedrawItems($ListView, $iItem, $iLast_Index)
    Else
    _GUICtrlListView_RedrawItems($ListView, $iLast_Index, $iItem - 1)
    EndIf

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

    $iLast_Index = $iItem

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

    Local $aLV_Pos = ControlGetPos($hWndGUI, "", $ListView)
    Local $iY = _GUICtrlListView_GetItemPositionY($ListView, $iItem)

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

    If $iY <= 0 Then Return $GUI_RUNDEFMSG

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

    _DrawLine($aLV_Pos[0], $iY, $aLV_Pos[2], 3, 0xFF0000, $h_ListView)
    EndFunc ;==>WM_MOUSEMOVE_EVENTS

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

    Func WM_NOTIFY_EVENTS($hWndGUI, $MsgID, $wParam, $lParam)
    Local $tagNMHDR, $iEvent, $hwndFrom, $iCode, $iItem

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

    $tagNMHDR = DllStructCreate("int;int;int;int", $lParam);NMHDR (hwndFrom, idFrom, code, Item)
    If @error Then Return $GUI_RUNDEFMSG

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

    $iCode = DllStructGetData($tagNMHDR, 3)
    $iItem = DllStructGetData($tagNMHDR, 4)

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

    Switch $wParam
    Case $ListView
    Switch $iCode
    Case $LVN_BEGINDRAG
    $a_Index[0] = $iItem
    $bDragging = True

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

    _GUICtrlListView_SetItemSelected($ListView, $iItem, False)
    EndSwitch
    EndSwitch

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

    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY_EVENTS

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

    Func _GUICtrlListView_CopyItem($hWnd_Source, $hWnd_Destination, $iSrcIndex, $iDstIndex, $fDelFlag = False)
    Local $iInsert_Index
    Local $tItem = DllStructCreate($tagLVITEM)

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

    Local $iCols = _GUICtrlListView_GetColumnCount($hWnd_Source)
    Local $iItems = _GUICtrlListView_GetItemCount($hWnd_Source)
    Local $iDest_Items = _GUICtrlListView_GetItemCount($hWnd_Destination)

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

    _GUICtrlListView_BeginUpdate($hWnd_Source)
    If $hWnd_Destination <> $hWnd_Source Then _GUICtrlListView_BeginUpdate($hWnd_Destination)

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

    DllStructSetData($tItem, "Mask", BitOR($LVIF_GROUPID, $LVIF_IMAGE, $LVIF_INDENT, $LVIF_PARAM, $LVIF_STATE))
    DllStructSetData($tItem, "Item", $iSrcIndex)
    DllStructSetData($tItem, "SubItem", 0)
    DllStructSetData($tItem, "StateMask", -1)

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

    _GUICtrlListView_GetItemEx($hWnd_Source, $tItem)

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

    If $iDstIndex > $iSrcIndex Then
    $iDstIndex += 1
    ElseIf $iSrcIndex > $iDstIndex Then
    $iSrcIndex += 1
    EndIf

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

    $iInsert_Index = _GUICtrlListView_InsertItem($hWnd_Destination, _
    _GUICtrlListView_GetItemText($hWnd_Source, $iSrcIndex, 0), $iDstIndex, DllStructGetData($tItem, "Image"))

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

    If BitAND(_GUICtrlListView_GetExtendedListViewStyle($hWnd_Source), $LVS_EX_CHECKBOXES) == $LVS_EX_CHECKBOXES Then
    If _GUICtrlListView_GetItemChecked($hWnd_Source, $iSrcIndex) Then _
    _GUICtrlListView_SetItemChecked($hWnd_Destination, $iInsert_Index)
    EndIf

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

    For $i = 0 To $iCols - 1
    DllStructSetData($tItem, "Item", $iInsert_Index)
    DllStructSetData($tItem, "SubItem", $i)

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

    _GUICtrlListView_GetItemEx($hWnd_Source, $tItem)

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

    _GUICtrlListView_AddSubItem($hWnd_Destination, $iInsert_Index, _
    _GUICtrlListView_GetItemText($hWnd_Source, $iSrcIndex, $i), $i, DllStructGetData($tItem, "Image"))
    Next

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

    If $fDelFlag Then _GUICtrlListView_DeleteItem($hWnd_Source, $iSrcIndex)

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

    If $iDstIndex > $iSrcIndex Then $iDstIndex -= 1
    _GUICtrlListView_SetItemSelected($hWnd_Source, $iDstIndex)

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

    _GUICtrlListView_EndUpdate($hWnd_Source)
    If $hWnd_Destination <> $hWnd_Source Then _GUICtrlListView_EndUpdate($hWnd_Destination)

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

    _GUICtrlListView_RedrawItems($hWnd_Destination, $iSrcIndex, $iDstIndex)
    ;DllCall("User32.dll", "int", "RedrawWindow", "hwnd", $hWnd_Destination, "ptr", 0, "int", 0, "int", 5)
    EndFunc ;==>_GUICtrlListView_CopyItem

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

    Func _DrawLine($iLeft, $iTop, $iWidth, $iHeight, $sColor, $hWnd = 0)
    $drawing = True
    $sColor = Hex("0x" & BitAND(BitShift(String(Binary($sColor)), 8), 0xFFFFFF));RGB2BGR

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

    Local $hDC = DllCall("User32.dll", "int", "GetDC", "hwnd", $hWnd)
    Local $aPen = DllCall("GDI32.dll", "int", "CreatePen", "int", 0, "int", $iHeight, "int", $sColor)

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

    DllCall("GDI32.dll", "int", "SelectObject", "int", $hDC[0], "int", $aPen[0])
    ConsoleWrite("drawline " & $iLastLineLeft & ', ' & $iLastLinetop & ', ' & $iLeft & ', ' & $iTop & @CRLF)
    If $iLastLinetop > -1 And $iLastLineLeft > -1 Then
    If $iLastLinetop <> $iTop Then; or $iLastLineLeft <> $iLeft Then
    Local $strRect = DllStructCreate("int[4]")

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

    DllStructSetData($strRect, 1, 5)
    DllStructSetData($strRect, 2, 75)
    DllStructSetData($strRect, 3, 198 + 5)
    DllStructSetData($strRect, 4, 280 + 75)
    Local $pRect = DllStructGetPtr($strRect)
    $iLastLineLeft = $iLeft
    $iLastLinetop = $iTop
    DllCall("user32.dll", "int", "InvalidateRect", "hwnd", GUICtrlGetHandle($ListView), "int", 0, "int", 1)
    Sleep(50);seems to be needed to ensure redrawn before line is drawn
    EndIf
    EndIf

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

    DllCall("GDI32.dll", "int", "MoveToEx", "hwnd", $hDC[0], "int", $iLeft, "int", $iTop, "int", 0)
    DllCall("GDI32.dll", "int", "LineTo", "hwnd", $hDC[0], "int", $iLeft + $iWidth, "int", $iTop)

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

    DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hWnd, "int", $hDC[0])
    DllCall("GDI32.dll", "int", "DeleteObject", "int", $aPen[0])
    $drawing = False
    EndFunc ;==>_DrawLine

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

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™