Listviewitem ansicht verändern

  • Morgen!
    ich hab also folgendes Listview:

    Spoiler anzeigen
    [autoit]

    $SenderListView = GUICtrlCreateListView("Sender|URL", 200, 60, 350, 310, BitOR($LVS_NOCOLUMNHEADER, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE))
    GUICtrlCreateListViewItem("Antenne Bayern|http://www.antenne.de/webradio/antenne.wmx ", $SenderListView)

    [/autoit]


    Ich will nun bei einem Doppelklick
    das Item hervorheben.
    Wie kann ich das machen?

    PS.:
    Noch ein Problem

    Spoiler anzeigen
    [autoit]

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY_Radio")
    GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES_FUNC')
    AdlibRegister("AKTUALISIEREN")

    [/autoit]


    2 Listviews zwei nötige abfragen, wie kann ich das machen?

    • Offizieller Beitrag

    So zum 1. Problem: Was meinst du mit hervorheben? Eine Andere Farbe oder Größe? Dabei könnte dir das helfen: ListView - SubItem einzeln färben/formatieren, Finale Version!.
    Die beiden Funktionen für WM_Notify, mußte du schon zu einer Zusammenfassen. Du kannst natürlich auch meine UDF dazu benutzen: WM_Notify per Funktion

  • Danke notify hab ich glaubeich verstanden:

    Spoiler anzeigen
    [autoit]

    _Notify_SetHandletoFunc($playlistlistview, "WM_NOTIFY",$aNotifySelect)
    _Notify_SetHandletoFunc($senderlistview, "WM_NOTIFY_Radio",$aNotifySelect)

    [/autoit]

    Aber wie geht das mit dem hervorheben,(ich möchte das item dicker machen.)
    Braucht man da die udf?

  • Raupi
    Wie soll ich das machen?
    ich hab

    Spoiler anzeigen
    [autoit]

    _Notify_SetNotifytoFunc($PlaylistListView,$NM_DBLCLK,"WM_NOTIFY")
    _Notify_SetNotifytoFunc($SenderListView,$NM_DBLCLK,"WM_NOTIFY_Radio")
    _StartUp_Notify(True)

    [/autoit]

    +

    Spoiler anzeigen
    [autoit]

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

    [/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 $NM_DBLCLK, $NM_RETURN
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    $iIndex = DllStructGetData($tInfo, "Index")
    _LEFTDBLCLICK(_GUICtrlListView_GetItemText($hWndListView, $iIndex, 1), $iIndex)
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    Func _LEFTDBLCLICK($file, $num)
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, False)
    $titelnummer = 0
    If $Playingstate = 1 Or 2 Then
    _BASS_CHANNELSTOP($hMusic)
    EndIf
    $Playingstate = -1

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

    $hMusic = _BASS_STREAMCREATEFILE(False, $file, 0, 0, 0)
    _BASS_CHANNELPLAY($hMusic, 0)
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    $Playingstate = 1
    $titelnummer = $num
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, True)
    EndFunc ;==>_LEFTDBLCLICK

    [/autoit]

    =

    Spoiler anzeigen

    ParentGUI : 0x001D1746
    ParentGUI : 0x001D1746
    Function does not exist or invalid number of parameters
    Function does not exist or invalid number of parameters

    => ?( ?( ?(

    • Offizieller Beitrag

    Wie soll ich dir jetzt anhand deiner Paar Codefetzen eine Antwort geben? Wie sieht das ganze Script aus?
    Ich kann dir nur soviel sagen, 90 % des Codes deiner Func WM_NOTIFY sind unnötig.

  • Hier bitte:

    Spoiler anzeigen
    [autoit]

    #include <Bass.au3>
    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <GuiListView.au3>
    #include <_GetFilesFolder_Rekursiv.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <SliderConstants.au3>
    #include <ListViewConstants.au3>
    #include <BassConstants.au3>
    #include <StructureConstants.au3>
    #include <Inet.au3>
    #include <Debug.au3>
    #include <JSound.au3>
    #include <RegisterNotify_UDF.au3>
    #NoTrayIcon

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

    #region Wrapper
    #AutoIt3Wrapper_icon=Pics\Sonstiges\INRico.ico
    #AutoIt3Wrapper_outfile=Kompiliert\INR-Multimediacenter.exe
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Res_Comment=INR-Multimediacenter (C) JuraX 2010 (http://www.jurax.square7.de)
    #AutoIt3Wrapper_Res_Description=INR-Multimediacenter
    #AutoIt3Wrapper_Res_LegalCopyright=JuraX
    #AutoIt3Wrapper_Res_SaveSource=y
    #AutoIt3Wrapper_Res_Language=1031
    #AutoIt3Wrapper_Add_Constants=n
    #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
    #endregion Wrapper

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

    #region Globals

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

    Opt("GUICloseOnESC", 0)
    Opt("TrayMenuMode", 1)
    Opt("MouseCoordMode", 0)

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

    Global Const $AC_SRC_ALPHA = 1
    Global Const $APPpfad = @AppDataCommonDir & "\INRadio\"
    Global Const $INR_INI = $APPpfad & "\INRadio.ini"
    Global Const $WM_DROPFILES = 0x0233
    Global $Playingstate = -1
    Global $titelnummer = 0
    Global $oWMP = ObjCreate("WMPLayer.ocx")
    Global $hMusic
    Global $Arraytoplay[1]
    Global $fftstruct = DllStructCreate("float[128]")
    Global $gaDropFiles[1]
    Global $aItem[2]
    Global $Hover

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

    $ShowTray = TrayCreateItem("Anzeigen")
    $HideTray = TrayCreateItem("Verstecken")
    $Killtray = TrayCreateItem("Schließen")

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

    #region Bass-Startup
    _BASS_STARTUP(@ScriptDir & "\sys\BASS.dll")
    ;_Bass_Tags_Startup(@ScriptDir & "\sys\BassTags.dll")
    _BASS_Init(0, -1, 44100, 0, "")
    If @error Then
    MsgBox(0, "Error", "Konnte Sound nicht Initialisieren!")
    Exit
    EndIf
    #endregion Bass-Startup

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

    #region FirstStart
    $FS = IniRead($INR_INI, "BOOT", "Firtsstart", "")
    Local $FS
    If $FS = "" Then
    ShellExecute("http://creativecommons.org/licenses/by-nc-nd/3.0/de/")
    $iMsgBoxAnswer = MsgBox(262452, "Lizenz", "Mit dem Starten dieses Programmes aktzeptieren sie die Aktuellen Lizenzbedingungen" & @CRLF & @CRLF & "INR jetzt starten?" & @CRLF)
    Select
    Case $iMsgBoxAnswer = 6 ;Yes
    Case $iMsgBoxAnswer = 7 ;No
    FileDelete(@ScriptFullPath)
    Exit
    EndSelect
    DirCreate(@AppDataCommonDir & "\INRadio\")
    DirCreate($APPpfad & "\JSoundextract")
    IniWrite($INR_INI, "BOOT", "Firtsstart", "False")
    EndIf
    #endregion FirstStart

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

    _GDIPlus_Startup()
    $hNewsImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INR.png")
    $hMusikImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRMusik.png")
    $hRadioImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRRadio.png")
    $hCDPlayerImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRCDPlayer.png")
    $hOptionenImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INROptionen.png")
    $hCreditsImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRCredits.png")
    $hForwHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\forwardbuttonhover.png")
    $hForwNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\forwardbuttonnohover.png")
    $hPlayHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Playbuttonhover.png")
    $hPlayNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Playbuttonnohover.png")
    $hBackHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\backbuttonhover.png")
    $hBackNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\backbuttonnohover.png")
    $hStopHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Stopbuttonhover.png")
    $hStopNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Stopbuttonnohover.png")

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

    If $CmdLine[0] = 0 Or $CmdLine[0] = "" Then
    $hAktullesImage = $hNewsImage
    Else
    $hAktullesImage = $hMusikImage
    EndIf

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

    $width = _GDIPlus_ImageGetWidth($hMusikImage)
    $height = _GDIPlus_ImageGetHeight($hMusikImage)

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

    GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES_FUNC')
    AdlibRegister("AKTUALISIEREN")

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

    #endregion Globals
    #region GUI
    $GUI = GUICreate("INR", $width, $height, -1, -1, BitOR($WS_POPUP, $WS_SYSMENU), $WS_EX_LAYERED)

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

    SetBitmap($GUI, $hAktullesImage, 0)
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUISetState()

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

    $WinPos = WinGetPos($GUI)

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

    $ChildGUI = GUICreate("", $width, $height, 0, 0, $WS_POPUP, BitOR($WS_EX_MDICHILD, $WS_EX_LAYERED), $GUI)
    $hGraphicButtons = _GDIPlus_GraphicsCreateFromHWND($ChildGUI)
    GUICtrlCreatePic(@ScriptDir & "\Pics\grey.gif", 0, 0, $width, $height)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $topplay = GUICtrlCreateLabel("", 110, 53, 41, 54)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $topvor = GUICtrlCreateLabel("", 152, 53, 37, 27)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $topback = GUICtrlCreateLabel("", 152, 81, 37, 27)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $Button_ = GUICtrlCreateButton("_", 523, 36, 20, 19)
    $ButtonX = GUICtrlCreateButton("X", 543, 36, 20, 19)

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

    $MusikTabLabel = GUICtrlCreateLabel("Musik", 49, 126, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $RadioTabLabel = GUICtrlCreateLabel("Radio", 49, 126 + 25, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $CDPlayerTabLabel = GUICtrlCreateLabel("CD-Player", 49, 126 + 50, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $OptionenTabLabel = GUICtrlCreateLabel("Optionen", 49, 331, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $CreditsTabLabel = GUICtrlCreateLabel("Credits", 49, 331 + 25, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    GUICtrlCreateTab(0, 0, 10, 10)
    GUICtrlSetState(-1, $GUI_HIDE)

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

    $NewsTab = GUICtrlCreateTabItem("News")
    GUICtrlCreateLabel("Version 3.0" & @CRLF & "Wie ihr sicher gemerkt habt gibt es nun ein neues Design!" & @CRLF & "Dafür nochmal vielen dank an:" & @CRLF & "Tince, Ludwig und Ubuntu, für das Wunderbare Design !", 200, 60, 300, 500)

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

    $MusikTab = GUICtrlCreateTabItem("Musik")
    GUICtrlCreateLabel("", 199, 59, 372, 82)
    GUICtrlSetBkColor(-1, 0x666666)
    $Graphik = GUICtrlCreateLabel("", 200, 60, 370, 80)
    GUICtrlSetBkColor(-1, 0xFFFFFF)

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

    If $CmdLine[0] > 0 Then
    GUICtrlSetState($MusikTab, $GUI_SHOW)
    EndIf

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

    ;==========================================Spektrum-Analysator====================================================
    $visGraphics = _GDIPlus_GraphicsCreateFromHWND(GUICtrlGetHandle($Graphik))
    $visBitmap = _GDIPlus_BitmapCreateFromGraphics(320, 80, $visGraphics)
    $visBuffer = _GDIPlus_ImageGetGraphicsContext($visBitmap)
    _GDIPlus_GraphicsClear($visBuffer)
    $pen_size = Int(320 / 128)
    $pen = _GDIPlus_PenCreate(0, $pen_size)
    $hBrush = _GDIPlus_BrushCreateSolid()
    $eq = 1

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

    $AktuellePositionSlider = GUICtrlCreateSlider(200, 145, 370, 20, $TBS_NOTICKS)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $SchonGespieltZeit = GUICtrlCreateLabel("0:00", 200, 165, 100, 20)
    $GesamtOderBeiKlickNochVerbleibendeZeit = GUICtrlCreateLabel("3:40", 470, 165, 100, 20, $SS_RIGHT)
    $PlaylistListView = GUICtrlCreateListView("Dateiname|Pfad", 200, 185, 350, 165, BitOR($LVS_NOCOLUMNHEADER, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE))
    $PlaylistAddMP3 = GUICtrlCreateButton("+", 550, 185, 20, 20)
    GUICtrlSetTip(-1, "MP3 zur Playlist hinzufügen")
    $PlaylistAddJSound = GUICtrlCreateButton("+J", 550, 205, 20, 20)
    GUICtrlSetTip(-1, "JSound zur Playlist hinzufügen")
    $PlaylistDelFile = GUICtrlCreateButton("-", 550, 225, 20, 20)
    GUICtrlSetTip(-1, "Datei aus Playlist löschen")
    $PlaylistCreateFromFolder = GUICtrlCreateButton("Playlist aus Ordner einlesen", 200, 352, 150, 20)
    $PlaylistSpeichern = GUICtrlCreateButton("Playlist speichern", 350, 352, 100, 20)
    $PlaylistLaden = GUICtrlCreateButton("Playlist laden", 450, 352, 100, 20)

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

    $RadioTab = GUICtrlCreateTabItem("Radio")
    $SenderListView = GUICtrlCreateListView("Sender|URL", 200, 60, 350, 310, BitOR($LVS_NOCOLUMNHEADER, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE))
    GUICtrlSendMsg($SenderListView, $LVM_SETCOLUMNWIDTH, 0, 350 - 25)
    $varnew = IniReadSectionNames($INR_INI)
    _ArraySearch($varnew, "Sender")
    If Not @error = 6 Then
    $var = IniReadSection($INR_INI, "Sender")
    For $i = 1 To $var[0][0]
    GUICtrlCreateListViewItem($var[$i][0] & "|" & $var[$i][1], $SenderListView)
    Next
    EndIf
    GUICtrlCreateListViewItem("Antenne Bayern|http://www.antenne.de/webradio/antenne.wmx ", $SenderListView)
    GUICtrlCreateListViewItem("Rock Antenne", $SenderListView)
    GUICtrlCreateListViewItem("Bayern 3", $SenderListView)
    GUICtrlCreateListViewItem("TechnoBase.FM", $SenderListView)
    $SenderAdd = GUICtrlCreateButton("+", 550, 60, 20, 20)
    GUICtrlSetTip(-1, "Sender zur Liste hinzufügen")
    $SenderDel = GUICtrlCreateButton("-", 550, 80, 20, 20)
    GUICtrlSetTip(-1, "Sender aus Liste löschen")

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

    $CDPlayerTab = GUICtrlCreateTabItem("CD-Player")
    GUICtrlCreateButton("BLABLA CD-Player", 200, 60, 100, 20)

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

    $OptionenTab = GUICtrlCreateTabItem("Optionen")
    GUICtrlCreateButton("BLABLA Optionen", 200, 60, 100, 20)

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

    $CreditsTab = GUICtrlCreateTabItem("Credits")
    GUICtrlCreateLabel("Credits:", 224, 92, 114, 28)
    GUICtrlSetFont(-1, 20, 400, 0, "Nasalization")
    GUICtrlCreateLabel("JuraX 2010", 256, 132, 124, 22)
    GUICtrlSetFont(-1, 15, 400, 0, "Nasalization")
    GUICtrlCreateLabel("Alle Rechte Vorbehalten", 256, 164, 283, 22)
    GUICtrlSetFont(-1, 15, 400, 0, "Nasalization")
    $LizenzZeigen = GUICtrlCreateButton("Lizenz", 228, 212, 129, 41, $WS_GROUP)
    GUICtrlSetFont(-1, 20, 400, 0, "Nasalization")
    $Betreff = GUICtrlCreateCombo("<Betreff auswählen>", 215, 260, 225, 25)
    GUICtrlSetData($Betreff, "Feedback|Support|Fehler melden")
    $Edit = GUICtrlCreateEdit("", 215, 288, 225, 80)
    $MailSenden = GUICtrlCreateButton("Mail Senden", 450, 260, 100, 100)

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

    GUICtrlCreateTabItem("")

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

    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, 0)

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

    GUISetState()

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

    For $i = 0 To 255 Step 30
    Sleep(5)
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    Next
    $i = 255
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    #endregion GUI

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

    #region CMD-Line

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

    If $CmdLine[0] = 0 Or $CmdLine[0] = "" Then
    $hAktullesImage = $hNewsImage
    ElseIf $CmdLine[0] = 1 Then
    $hAktullesImage = $hMusikImage
    $hMusic = _BASS_StreamCreateFile(False, $CmdLine[1], 0, 0, 0)
    _BASS_ChannelPlay($hMusic, 0)
    $Playingstate = 1
    Else
    $hAktullesImage = $hNewsImage
    EndIf

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

    #endregion
    _Notify_SetNotifytoFunc($PlaylistListView,$NM_DBLCLK,"WM_NOTIFY")
    _Notify_SetNotifytoFunc($SenderListView,$NM_DBLCLK,"WM_NOTIFY_Radio")
    _StartUp_Notify(True)

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

    While (True)
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 0, $LVSCW_AUTOSIZE)
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 1, 0)
    _GUICtrlListView_SetColumnWidth($SenderListView, 0, $LVSCW_AUTOSIZE)
    _GUICtrlListView_SetColumnWidth($SenderListView, 1, 0)
    If $Playingstate = 1 Then
    $song_length = _BASS_ChannelGetLength($hMusic, $BASS_POS_BYTE)
    $current = _BASS_ChannelGetPosition($hMusic, $BASS_POS_BYTE)
    $percent = Round(($current / $song_length) * 100, 0)
    GUICtrlSetData($AktuellePositionSlider, $percent)
    DISPLAY_VIS()
    If $current = $song_length Then
    GUICtrlSetData($AktuellePositionSlider, 0)
    _BASS_ChannelPlay($hMusic, True)
    EndIf
    EndIf
    Switch GUIGetMsg($ChildGUI)
    Case $Button_
    WinSetState($GUI, "", @SW_MINIMIZE)
    Case $GUI_EVENT_CLOSE, $ButtonX
    ExitLoop
    Case $PlaylistAddMP3
    $MusikFileHinzufuegen = FileOpenDialog("Öffnen...", "", 'MP3-Dateien (*.mp3)')
    $dateiname = StringSplit($MusikFileHinzufuegen, "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateinameOhneMP3[1] & "|" & $MusikFileHinzufuegen, $PlaylistListView)
    Case $PlaylistDelFile
    _GUICtrlListView_DeleteItemsSelected($PlaylistListView)
    Case $PlaylistAddJSound
    $filepath = FileOpenDialog("Öffnen...", "", 'JSound-Dateien (*.JSound)')
    $Filedestination = $APPpfad & "\JSoundextract"
    _JSound_GetFiles($filepath, $Filedestination, @ScriptDir & "\sys\JHelper.dll")
    $JSREK = _GetFilesFolder_Rekursiv($Filedestination & "\", "mp3", 0)
    For $i = 1 To $JSREK[0]
    $dateiname = StringSplit($JSREK[$i], "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateiname[$dateiname[0]] & "|" & $JSREK[$i], $PlaylistListView)
    Next
    Case $LizenzZeigen
    ShellExecute("http://creativecommons.org/licenses/by-nc-nd/3.0/de/")
    Case $PlaylistCreateFromFolder
    $selectedbib = FileSelectFolder("Ordner Einlesen...", "")
    $returnputin = _GetFilesFolder_Rekursiv($selectedbib, "mp3", 0)
    For $i = 1 To $returnputin[0]
    $dateiname = StringSplit($returnputin[$i], "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateiname[$dateiname[0]] & "|" & $returnputin[$i], $PlaylistListView)
    Next
    Case $topplay
    _Playfromtop()
    Case $topvor
    _Playnext()
    Case $topback
    _Playback()
    Case $MailSenden
    Mail()
    Case $SenderAdd
    $Name = InputBox("Sendername", "Bitte Sendername angeben!")
    $Pfad = InputBox("Senderadresse", "Bitte Senderadresse angeben!")
    $iMsgBoxAnswer = MsgBox(291, "Fertig stellen", "Sendername: " & $Name & @CRLF & "Senderpfad: " & $Pfad & @CRLF & @CRLF & "Ist das richtig?")
    Select
    Case $iMsgBoxAnswer = 6 ;Yes
    MsgBox(0, "", "Sender hinzugefügt!")
    IniWrite($INR_INI, "Sender", $Name, $Pfad)
    Case $iMsgBoxAnswer = 7 ;No

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

    Case $iMsgBoxAnswer = 2 ;Cancel

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

    EndSelect
    case $SenderDel

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

    EndSwitch

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

    _CheckHover()
    WEnd

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

    For $i = 255 To 0 Step -30
    Sleep(5)
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    Next
    _BASS_STOP()
    _BASS_FREE()
    _WinAPI_DeleteObject($hNewsImage)
    _WinAPI_DeleteObject($hMusikImage)
    _WinAPI_DeleteObject($hRadioImage)
    _WinAPI_DeleteObject($hCDPlayerImage)
    _WinAPI_DeleteObject($hOptionenImage)
    _WinAPI_DeleteObject($hCreditsImage)
    _GDIPlus_Shutdown()

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

    $returnputin = _GetFilesFolder_Rekursiv($APPpfad & "\JSoundextract", "mp3", 0)
    For $i = 1 To $returnputin[0]
    $dateinamedel = FileDelete($returnputin[$i])
    Next
    Exit

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

    Func DISPLAY_VIS($eq = 1)
    _GDIPlus_GraphicsClear($visBuffer, 0x77FFFFFF)
    If $eq > 0 Then
    $levels = _BASS_ChannelGetLevel($hMusic)
    $LeftChannel = Round((_LoWord($levels) / 32768) * 80, 0)
    $RightChannel = Round((_HiWord($levels) / 32768) * 80, 0)

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

    _GDIPlus_BrushSetSolidColor($hBrush, _CalcColor($LeftChannel))
    _GDIPlus_GraphicsFillRect($visBuffer, 0, 80 - $LeftChannel, 20, $LeftChannel, $hBrush)

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

    _GDIPlus_BrushSetSolidColor($hBrush, _CalcColor($RightChannel))
    _GDIPlus_GraphicsFillRect($visBuffer, 25, 80 - $RightChannel, 20, $RightChannel, $hBrush)

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

    _BASS_CHANNELGETDATA($hMusic, DllStructGetPtr($fftstruct), $BASS_DATA_FFT256)
    For $i = 1 To 127 Step 1
    $FFT = Round(DllStructGetData($fftstruct, 1, $i + 1) * 700)
    _GDIPlus_PenSetColor($pen, _CalcColor($FFT))
    _GDIPlus_GraphicsDrawLine($visBuffer, 50 + $i * $pen_size, 80, 50 + $i * $pen_size, 80 - $FFT, $pen)
    Next
    EndIf
    _GDIPlus_GraphicsDrawImageRect($visGraphics, $visBitmap, 0, 0, 320, 80)
    EndFunc ;==>DISPLAY_VIS

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

    Func _CalcColor($iPercent)
    $R = $iPercent * 3.5
    $G = 171
    $B = 255
    Return "0x77" & Hex($R, 2) & Hex($G, 2) & Hex($B, 2)
    EndFunc ;==>_CalcColor

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

    #region Funcs :2:
    Func _CheckHover()
    $CurInf = GUIGetCursorInfo($ChildGUI)
    If @error Then Return

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

    If $Hover Then
    If $CurInf[2] Then
    Switch $Hover
    Case $MusikTabLabel
    If $hAktullesImage <> $hMusikImage Then
    $hAktullesImage = $hMusikImage
    GUICtrlSetState($MusikTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $RadioTabLabel
    If $hAktullesImage <> $hRadioImage Then
    $hAktullesImage = $hRadioImage
    GUICtrlSetState($RadioTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $CDPlayerTabLabel
    If $hAktullesImage <> $hCDPlayerImage Then
    $hAktullesImage = $hCDPlayerImage
    GUICtrlSetState($CDPlayerTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $OptionenTabLabel
    If $hAktullesImage <> $hOptionenImage Then
    $hAktullesImage = $hOptionenImage
    GUICtrlSetState($OptionenTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $CreditsTabLabel
    If $hAktullesImage <> $hCreditsImage Then
    $hAktullesImage = $hCreditsImage
    GUICtrlSetState($CreditsTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    EndSwitch
    EndIf
    EndIf

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

    If $Hover = $CurInf[4] Then Return

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

    Switch $Hover
    Case $MusikTabLabel, $RadioTabLabel, $CDPlayerTabLabel, $OptionenTabLabel, $CreditsTabLabel
    GUICtrlSetColor($Hover, 0xFFFFFF)
    Case $topplay
    If ($Playingstate = 1) Or ($Playingstate = 2) Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    If $Playingstate = -1 Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Case $topvor
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hForwNoHoverImage, 152, 53, 37, 27)
    Case $topback
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hBackNoHoverImage, 152, 80, 37, 28)
    EndSwitch

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

    $Hover = $CurInf[4]
    Switch $Hover
    Case $MusikTabLabel, $RadioTabLabel, $CDPlayerTabLabel, $OptionenTabLabel, $CreditsTabLabel
    GUICtrlSetColor($Hover, 0xCCCCCC)
    Case $topplay
    If ($Playingstate = 1) Or ($Playingstate = 2) Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopHoverImage, 108, 53, 43, 55)
    If $Playingstate = -1 Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayHoverImage, 108, 53, 43, 55)
    Case $topvor
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hForwHoverImage, 152, 53, 37, 27)
    Case $topback
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hBackHoverImage, 152, 80, 37, 28)
    EndSwitch
    EndFunc ;==>_CheckHover

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

    Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    If ($hWnd = $GUI) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION
    EndFunc ;==>WM_NCHITTEST

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

    Func SetBitmap($hgui, $hImage, $iOpacity)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend

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

    $hScrDC = _WinAPI_GetDC(0)
    $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
    _WinAPI_UpdateLayeredWindow($hgui, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_ReleaseDC(0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
    EndFunc ;==>SetBitmap

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

    Func WM_DROPFILES_FUNC($hWnd, $MSGID, $WPARAM, $LPARAM)
    Local $NSIZE, $PFILENAME
    Local $NAMT = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", -1, "ptr", 0, "int", 255)
    For $i = 0 To $NAMT[0]
    $NSIZE = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", $i, "ptr", 0, "int", 0)
    $NSIZE = $NSIZE[0] + 1
    $PFILENAME = DllStructCreate("wchar[" & $NSIZE & "]")
    DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", $i, "ptr", DllStructGetPtr($PFILENAME), "int", $NSIZE)
    $FILENAME = DllStructGetData($PFILENAME, 1)
    ConsoleWrite($FILENAME & @CRLF)
    ReDim $gaDropFiles[$i + 1]
    $gaDropFiles[$i] = DllStructGetData($PFILENAME, 1)
    $PFILENAME = 0
    Next
    For $i = 0 To UBound($gaDropFiles) - 2
    GUICtrlCreateListViewItem(StringRegExpReplace($gaDropFiles[$i], ".*\\(.*)\..*", "$1") & "|" & $gaDropFiles[$i], $PlaylistListView)
    Next
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 0, $LVSCW_AUTOSIZE)
    EndFunc ;==>WM_DROPFILES_FUNC

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

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

    [/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 $NM_DBLCLK, $NM_RETURN
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    $iIndex = DllStructGetData($tInfo, "Index")
    _LEFTDBLCLICK(_GUICtrlListView_GetItemText($hWndListView, $iIndex, 1), $iIndex)
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    Func _LEFTDBLCLICK($file, $num)
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, False)
    $titelnummer = 0
    If $Playingstate = 1 Or 2 Then
    _BASS_CHANNELSTOP($hMusic)
    EndIf
    $Playingstate = -1

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

    $hMusic = _BASS_STREAMCREATEFILE(False, $file, 0, 0, 0)
    _BASS_CHANNELPLAY($hMusic, 0)
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    $Playingstate = 1
    $titelnummer = $num
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, True)
    EndFunc ;==>_LEFTDBLCLICK

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

    Func _Playfromtop()
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Return
    EndIf
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    For $i = 0 To _GUICtrlListView_GetItemCount($PlaylistListView)
    If _GUICtrlListView_GetItemSelected($PlaylistListView, $i) Then
    _PlayMusic($i)
    Return
    EndIf
    Next
    _PlayMusic(0)
    EndFunc ;==>_Playfromtop

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

    Func _PlayMusic($listviewline)
    $file = _GUICtrlListView_GetItemTextArray($PlaylistListView, $listviewline)
    $hMusic = _BASS_STREAMCREATEFILE(False, $file[2], 0, 0, 0)
    _BASS_CHANNELPLAY($hMusic, 0)
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    $Playingstate = 1
    $titelnummer = $listviewline
    EndFunc ;==>_PlayMusic

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

    Func _Playnext()
    Local $wasplaying = 0
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    $wasplaying = 1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Sleep(500)
    EndIf
    If $titelnummer = _GUICtrlListView_GetItemCount($PlaylistListView) - 1 Then $titelnummer = -1
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    If $wasplaying = 1 Then _PlayMusic($titelnummer + 1)
    EndFunc ;==>_Playnext

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

    Func _Playback()
    Local $wasplaying = 0
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    $wasplaying = 1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Sleep(500)
    EndIf
    If $titelnummer = 0 Then $titelnummer = _GUICtrlListView_GetItemCount($PlaylistListView)
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    If $wasplaying = 1 Then _PlayMusic($titelnummer - 1)
    EndFunc ;==>_Playback

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

    Func AKTUALISIEREN()
    $song_lengthdata = StringSplit(_BASS_ChannelBytes2Seconds($hMusic, _BASS_ChannelGetLength($hMusic, $BASS_POS_BYTE)), ".")
    $currentdata = StringSplit(_BASS_ChannelBytes2Seconds($hMusic, _BASS_ChannelGetPosition($hMusic, $BASS_POS_BYTE)), ".")
    $currentdata = Floor($currentdata[1] / 60) & ":" & $currentdata[1] - Floor($currentdata[1] / 60) * 60
    $song_lengthdata = Floor($song_lengthdata[1] / 60) & ":" & $song_lengthdata[1] - Floor($song_lengthdata[1] / 60) * 60
    GUICtrlSetData($GesamtOderBeiKlickNochVerbleibendeZeit, $song_lengthdata)
    GUICtrlSetData($SchonGespieltZeit, $currentdata)
    EndFunc ;==>AKTUALISIEREN

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

    Func Mail()
    $Betreffsend = GUICtrlRead($Betreff)
    $Editsend = GUICtrlRead($Edit)
    If $Betreffsend = "" Or $Betreffsend = "<Betreff auswählen>" Then
    MsgBox(48, "Warnung!", "Bitte Betreff auswählen !")
    Return
    EndIf
    _INetMail("*@gmx.net", $Betreffsend, _DebugBugReportEnv() & @CRLF & $Editsend & @CRLF & @Compiled)
    EndFunc ;==>Mail

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

    Func WM_NOTIFY_Radio($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg, $iwParam
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    $hWndListView = $SenderListView
    If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($SenderListView)

    [/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 $NM_DBLCLK, $NM_RETURN
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    $iIndex = DllStructGetData($tInfo, "Index")
    _LEFTDBLCLICK_Radio(_GUICtrlListView_GetItemText($hWndListView, $iIndex, 1))
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    Func _LEFTDBLCLICK_Radio($file)
    MsgBox(0,"",$file)
    EndFunc ;==>_LEFTDBLCLICK
    #endregion Funcs :2:

    [/autoit]


    Alleine Funktionieren die Funktionen !

    • Offizieller Beitrag

    Du hast bei den Funktionen die aus meiner UDF aufgerufen werden nur 4 Parameter verwendet. Es müssen aber 5 im Funktionskopf stehen.
    Habe dir dein Script mal abgeändert und die unnützen Teile in den Notify Funktionen auskommentiert.

    Spoiler anzeigen
    [autoit]

    #include <Bass.au3>
    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <GuiListView.au3>
    #include <_GetFilesFolder_Rekursiv.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <SliderConstants.au3>
    #include <ListViewConstants.au3>
    #include <BassConstants.au3>
    #include <StructureConstants.au3>
    #include <Inet.au3>
    #include <Debug.au3>
    #include <JSound.au3>
    #include <RegisterNotify_UDF.au3>
    #NoTrayIcon

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

    #region Wrapper
    #AutoIt3Wrapper_icon=Pics\Sonstiges\INRico.ico
    #AutoIt3Wrapper_outfile=Kompiliert\INR-Multimediacenter.exe
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Res_Comment=INR-Multimediacenter (C) JuraX 2010 (http://www.jurax.square7.de)
    #AutoIt3Wrapper_Res_Description=INR-Multimediacenter
    #AutoIt3Wrapper_Res_LegalCopyright=JuraX
    #AutoIt3Wrapper_Res_SaveSource=y
    #AutoIt3Wrapper_Res_Language=1031
    #AutoIt3Wrapper_Add_Constants=n
    #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y
    #endregion Wrapper

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

    #region Globals

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

    Opt("GUICloseOnESC", 0)
    Opt("TrayMenuMode", 1)
    Opt("MouseCoordMode", 0)

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

    Global Const $AC_SRC_ALPHA = 1
    Global Const $APPpfad = @AppDataCommonDir & "\INRadio\"
    Global Const $INR_INI = $APPpfad & "\INRadio.ini"
    Global Const $WM_DROPFILES = 0x0233
    Global $Playingstate = -1
    Global $titelnummer = 0
    Global $oWMP = ObjCreate("WMPLayer.ocx")
    Global $hMusic
    Global $Arraytoplay[1]
    Global $fftstruct = DllStructCreate("float[128]")
    Global $gaDropFiles[1]
    Global $aItem[2]
    Global $Hover

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

    Global $ShowTray = TrayCreateItem("Anzeigen")
    Global $HideTray = TrayCreateItem("Verstecken")
    Global $Killtray = TrayCreateItem("Schließen")

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

    #region Bass-Startup
    _BASS_STARTUP(@ScriptDir & "\sys\BASS.dll")
    ;_Bass_Tags_Startup(@ScriptDir & "\sys\BassTags.dll")
    _BASS_Init(0, -1, 44100, 0, "")
    If @error Then
    MsgBox(0, "Error", "Konnte Sound nicht Initialisieren!")
    Exit
    EndIf
    #endregion Bass-Startup

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

    #region FirstStart
    Global $FS = IniRead($INR_INI, "BOOT", "Firtsstart", "")

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

    If $FS = "" Then
    ShellExecute("http://creativecommons.org/licenses/by-nc-nd/3.0/de/")
    $iMsgBoxAnswer = MsgBox(262452, "Lizenz", "Mit dem Starten dieses Programmes aktzeptieren sie die Aktuellen Lizenzbedingungen" & @CRLF & @CRLF & "INR jetzt starten?" & @CRLF)
    Select
    Case $iMsgBoxAnswer = 6 ;Yes
    Case $iMsgBoxAnswer = 7 ;No
    FileDelete(@ScriptFullPath)
    Exit
    EndSelect
    DirCreate(@AppDataCommonDir & "\INRadio\")
    DirCreate($APPpfad & "\JSoundextract")
    IniWrite($INR_INI, "BOOT", "Firtsstart", "False")
    EndIf
    #endregion FirstStart

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

    _GDIPlus_Startup()
    $hNewsImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INR.png")
    $hMusikImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRMusik.png")
    $hRadioImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRRadio.png")
    $hCDPlayerImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRCDPlayer.png")
    $hOptionenImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INROptionen.png")
    $hCreditsImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\INRCredits.png")
    $hForwHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\forwardbuttonhover.png")
    $hForwNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\forwardbuttonnohover.png")
    $hPlayHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Playbuttonhover.png")
    $hPlayNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Playbuttonnohover.png")
    $hBackHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\backbuttonhover.png")
    $hBackNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\backbuttonnohover.png")
    $hStopHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Stopbuttonhover.png")
    $hStopNoHoverImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Pics\Stopbuttonnohover.png")

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

    If $CmdLine[0] = 0 Or $CmdLine[0] = "" Then
    $hAktullesImage = $hNewsImage
    Else
    $hAktullesImage = $hMusikImage
    EndIf

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

    $width = _GDIPlus_ImageGetWidth($hMusikImage)
    $height = _GDIPlus_ImageGetHeight($hMusikImage)

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

    GUIRegisterMsg($WM_DROPFILES, 'WM_DROPFILES_FUNC')
    AdlibRegister("AKTUALISIEREN")

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

    #endregion Globals
    #region GUI
    $GUI = GUICreate("INR", $width, $height, -1, -1, BitOR($WS_POPUP, $WS_SYSMENU), $WS_EX_LAYERED)

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

    SetBitmap($GUI, $hAktullesImage, 0)
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUISetState()

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

    $WinPos = WinGetPos($GUI)

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

    $ChildGUI = GUICreate("", $width, $height, 0, 0, $WS_POPUP, BitOR($WS_EX_MDICHILD, $WS_EX_LAYERED), $GUI)
    $hGraphicButtons = _GDIPlus_GraphicsCreateFromHWND($ChildGUI)
    GUICtrlCreatePic(@ScriptDir & "\Pics\grey.gif", 0, 0, $width, $height)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $topplay = GUICtrlCreateLabel("", 110, 53, 41, 54)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $topvor = GUICtrlCreateLabel("", 152, 53, 37, 27)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $topback = GUICtrlCreateLabel("", 152, 81, 37, 27)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $Button_ = GUICtrlCreateButton("_", 523, 36, 20, 19)
    $ButtonX = GUICtrlCreateButton("X", 543, 36, 20, 19)

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

    $MusikTabLabel = GUICtrlCreateLabel("Musik", 49, 126, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $RadioTabLabel = GUICtrlCreateLabel("Radio", 49, 126 + 25, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $CDPlayerTabLabel = GUICtrlCreateLabel("CD-Player", 49, 126 + 50, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $OptionenTabLabel = GUICtrlCreateLabel("Optionen", 49, 331, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    $CreditsTabLabel = GUICtrlCreateLabel("Credits", 49, 331 + 25, 128, 17, $SS_CENTER)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

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

    GUICtrlCreateTab(0, 0, 10, 10)
    GUICtrlSetState(-1, $GUI_HIDE)

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

    $NewsTab = GUICtrlCreateTabItem("News")
    GUICtrlCreateLabel("Version 3.0" & @CRLF & "Wie ihr sicher gemerkt habt gibt es nun ein neues Design!" & @CRLF & "Dafür nochmal vielen dank an:" & @CRLF & "Tince, Ludwig und Ubuntu, für das Wunderbare Design !", 200, 60, 300, 500)

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

    $MusikTab = GUICtrlCreateTabItem("Musik")
    GUICtrlCreateLabel("", 199, 59, 372, 82)
    GUICtrlSetBkColor(-1, 0x666666)
    $Graphik = GUICtrlCreateLabel("", 200, 60, 370, 80)
    GUICtrlSetBkColor(-1, 0xFFFFFF)

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

    If $CmdLine[0] > 0 Then
    GUICtrlSetState($MusikTab, $GUI_SHOW)
    EndIf

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

    ;==========================================Spektrum-Analysator====================================================
    $visGraphics = _GDIPlus_GraphicsCreateFromHWND(GUICtrlGetHandle($Graphik))
    $visBitmap = _GDIPlus_BitmapCreateFromGraphics(320, 80, $visGraphics)
    $visBuffer = _GDIPlus_ImageGetGraphicsContext($visBitmap)
    _GDIPlus_GraphicsClear($visBuffer)
    $pen_size = Int(320 / 128)
    $pen = _GDIPlus_PenCreate(0, $pen_size)
    $hBrush = _GDIPlus_BrushCreateSolid()
    $eq = 1

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

    $AktuellePositionSlider = GUICtrlCreateSlider(200, 145, 370, 20, $TBS_NOTICKS)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    $SchonGespieltZeit = GUICtrlCreateLabel("0:00", 200, 165, 100, 20)
    $GesamtOderBeiKlickNochVerbleibendeZeit = GUICtrlCreateLabel("3:40", 470, 165, 100, 20, $SS_RIGHT)
    $PlaylistListView = GUICtrlCreateListView("Dateiname|Pfad", 200, 185, 350, 165, BitOR($LVS_NOCOLUMNHEADER, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE))
    $PlaylistAddMP3 = GUICtrlCreateButton("+", 550, 185, 20, 20)
    GUICtrlSetTip(-1, "MP3 zur Playlist hinzufügen")
    $PlaylistAddJSound = GUICtrlCreateButton("+J", 550, 205, 20, 20)
    GUICtrlSetTip(-1, "JSound zur Playlist hinzufügen")
    $PlaylistDelFile = GUICtrlCreateButton("-", 550, 225, 20, 20)
    GUICtrlSetTip(-1, "Datei aus Playlist löschen")
    $PlaylistCreateFromFolder = GUICtrlCreateButton("Playlist aus Ordner einlesen", 200, 352, 150, 20)
    $PlaylistSpeichern = GUICtrlCreateButton("Playlist speichern", 350, 352, 100, 20)
    $PlaylistLaden = GUICtrlCreateButton("Playlist laden", 450, 352, 100, 20)

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

    $RadioTab = GUICtrlCreateTabItem("Radio")
    $SenderListView = GUICtrlCreateListView("Sender|URL", 200, 60, 350, 310, BitOR($LVS_NOCOLUMNHEADER, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_DOUBLEBUFFER, $LVS_EX_FULLROWSELECT, $WS_EX_CLIENTEDGE))
    GUICtrlSendMsg($SenderListView, $LVM_SETCOLUMNWIDTH, 0, 350 - 25)
    $varnew = IniReadSectionNames($INR_INI)
    _ArraySearch($varnew, "Sender")
    If Not @error = 6 Then
    $var = IniReadSection($INR_INI, "Sender")
    For $i = 1 To $var[0][0]
    GUICtrlCreateListViewItem($var[$i][0] & "|" & $var[$i][1], $SenderListView)
    Next
    EndIf
    GUICtrlCreateListViewItem("Antenne Bayern|http://www.antenne.de/webradio/antenne.wmx ", $SenderListView)
    GUICtrlCreateListViewItem("Rock Antenne", $SenderListView)
    GUICtrlCreateListViewItem("Bayern 3", $SenderListView)
    GUICtrlCreateListViewItem("TechnoBase.FM", $SenderListView)
    $SenderAdd = GUICtrlCreateButton("+", 550, 60, 20, 20)
    GUICtrlSetTip(-1, "Sender zur Liste hinzufügen")
    $SenderDel = GUICtrlCreateButton("-", 550, 80, 20, 20)
    GUICtrlSetTip(-1, "Sender aus Liste löschen")

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

    $CDPlayerTab = GUICtrlCreateTabItem("CD-Player")
    GUICtrlCreateButton("BLABLA CD-Player", 200, 60, 100, 20)

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

    $OptionenTab = GUICtrlCreateTabItem("Optionen")
    GUICtrlCreateButton("BLABLA Optionen", 200, 60, 100, 20)

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

    $CreditsTab = GUICtrlCreateTabItem("Credits")
    GUICtrlCreateLabel("Credits:", 224, 92, 114, 28)
    GUICtrlSetFont(-1, 20, 400, 0, "Nasalization")
    GUICtrlCreateLabel("JuraX 2010", 256, 132, 124, 22)
    GUICtrlSetFont(-1, 15, 400, 0, "Nasalization")
    GUICtrlCreateLabel("Alle Rechte Vorbehalten", 256, 164, 283, 22)
    GUICtrlSetFont(-1, 15, 400, 0, "Nasalization")
    $LizenzZeigen = GUICtrlCreateButton("Lizenz", 228, 212, 129, 41, $WS_GROUP)
    GUICtrlSetFont(-1, 20, 400, 0, "Nasalization")
    $Betreff = GUICtrlCreateCombo("<Betreff auswählen>", 215, 260, 225, 25)
    GUICtrlSetData($Betreff, "Feedback|Support|Fehler melden")
    $Edit = GUICtrlCreateEdit("", 215, 288, 225, 80)
    $MailSenden = GUICtrlCreateButton("Mail Senden", 450, 260, 100, 100)

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

    GUICtrlCreateTabItem("")

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

    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, 0)

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

    GUISetState()

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

    For $i = 0 To 255 Step 30
    Sleep(5)
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    Next
    $i = 255
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    #endregion GUI

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

    #region CMD-Line

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

    If $CmdLine[0] = 0 Or $CmdLine[0] = "" Then
    $hAktullesImage = $hNewsImage
    ElseIf $CmdLine[0] = 1 Then
    $hAktullesImage = $hMusikImage
    $hMusic = _BASS_StreamCreateFile(False, $CmdLine[1], 0, 0, 0)
    _BASS_ChannelPlay($hMusic, 0)
    $Playingstate = 1
    Else
    $hAktullesImage = $hNewsImage
    EndIf

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

    #endregion
    _Notify_SetNotifytoFunc($PlaylistListView,$NM_DBLCLK,"WM_NOTIFY")
    _Notify_SetNotifytoFunc($SenderListView,$NM_DBLCLK,"WM_NOTIFY_Radio")
    _StartUp_Notify(True)

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

    While (True)
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 0, $LVSCW_AUTOSIZE)
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 1, 0)
    _GUICtrlListView_SetColumnWidth($SenderListView, 0, $LVSCW_AUTOSIZE)
    _GUICtrlListView_SetColumnWidth($SenderListView, 1, 0)
    If $Playingstate = 1 Then
    $song_length = _BASS_ChannelGetLength($hMusic, $BASS_POS_BYTE)
    $current = _BASS_ChannelGetPosition($hMusic, $BASS_POS_BYTE)
    $percent = Round(($current / $song_length) * 100, 0)
    GUICtrlSetData($AktuellePositionSlider, $percent)
    DISPLAY_VIS()
    If $current = $song_length Then
    GUICtrlSetData($AktuellePositionSlider, 0)
    _BASS_ChannelPlay($hMusic, True)
    EndIf
    EndIf
    Switch GUIGetMsg($ChildGUI)
    Case $Button_
    WinSetState($GUI, "", @SW_MINIMIZE)
    Case $GUI_EVENT_CLOSE, $ButtonX
    ExitLoop
    Case $PlaylistAddMP3
    $MusikFileHinzufuegen = FileOpenDialog("Öffnen...", "", 'MP3-Dateien (*.mp3)')
    $dateiname = StringSplit($MusikFileHinzufuegen, "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateinameOhneMP3[1] & "|" & $MusikFileHinzufuegen, $PlaylistListView)
    Case $PlaylistDelFile
    _GUICtrlListView_DeleteItemsSelected($PlaylistListView)
    Case $PlaylistAddJSound
    $filepath = FileOpenDialog("Öffnen...", "", 'JSound-Dateien (*.JSound)')
    $Filedestination = $APPpfad & "\JSoundextract"
    _JSound_GetFiles($filepath, $Filedestination, @ScriptDir & "\sys\JHelper.dll")
    $JSREK = _GetFilesFolder_Rekursiv($Filedestination & "\", "mp3", 0)
    For $i = 1 To $JSREK[0]
    $dateiname = StringSplit($JSREK[$i], "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateiname[$dateiname[0]] & "|" & $JSREK[$i], $PlaylistListView)
    Next
    Case $LizenzZeigen
    ShellExecute("http://creativecommons.org/licenses/by-nc-nd/3.0/de/")
    Case $PlaylistCreateFromFolder
    $selectedbib = FileSelectFolder("Ordner Einlesen...", "")
    $returnputin = _GetFilesFolder_Rekursiv($selectedbib, "mp3", 0)
    For $i = 1 To $returnputin[0]
    $dateiname = StringSplit($returnputin[$i], "\")
    $dateinameOhneMP3 = StringSplit($dateiname[$dateiname[0]], ".")
    GUICtrlCreateListViewItem($dateiname[$dateiname[0]] & "|" & $returnputin[$i], $PlaylistListView)
    Next
    Case $topplay
    _Playfromtop()
    Case $topvor
    _Playnext()
    Case $topback
    _Playback()
    Case $MailSenden
    Mail()
    Case $SenderAdd
    $Name = InputBox("Sendername", "Bitte Sendername angeben!")
    $Pfad = InputBox("Senderadresse", "Bitte Senderadresse angeben!")
    $iMsgBoxAnswer = MsgBox(291, "Fertig stellen", "Sendername: " & $Name & @CRLF & "Senderpfad: " & $Pfad & @CRLF & @CRLF & "Ist das richtig?")
    Select
    Case $iMsgBoxAnswer = 6 ;Yes
    MsgBox(0, "", "Sender hinzugefügt!")
    IniWrite($INR_INI, "Sender", $Name, $Pfad)
    Case $iMsgBoxAnswer = 7 ;No

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

    Case $iMsgBoxAnswer = 2 ;Cancel

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

    EndSelect
    case $SenderDel

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

    EndSwitch

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

    _CheckHover()
    WEnd

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

    For $i = 255 To 0 Step -30
    Sleep(5)
    SetBitmap($GUI, $hAktullesImage, $i)
    _WinAPI_SetLayeredWindowAttributes($ChildGUI, 0x999999, $i)
    Next
    _BASS_STOP()
    _BASS_FREE()
    _WinAPI_DeleteObject($hNewsImage)
    _WinAPI_DeleteObject($hMusikImage)
    _WinAPI_DeleteObject($hRadioImage)
    _WinAPI_DeleteObject($hCDPlayerImage)
    _WinAPI_DeleteObject($hOptionenImage)
    _WinAPI_DeleteObject($hCreditsImage)
    _GDIPlus_Shutdown()

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

    $returnputin = _GetFilesFolder_Rekursiv($APPpfad & "\JSoundextract", "mp3", 0)
    For $i = 1 To $returnputin[0]
    $dateinamedel = FileDelete($returnputin[$i])
    Next
    Exit

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

    Func DISPLAY_VIS($eq = 1)
    _GDIPlus_GraphicsClear($visBuffer, 0x77FFFFFF)
    If $eq > 0 Then
    $levels = _BASS_ChannelGetLevel($hMusic)
    $LeftChannel = Round((_LoWord($levels) / 32768) * 80, 0)
    $RightChannel = Round((_HiWord($levels) / 32768) * 80, 0)

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

    _GDIPlus_BrushSetSolidColor($hBrush, _CalcColor($LeftChannel))
    _GDIPlus_GraphicsFillRect($visBuffer, 0, 80 - $LeftChannel, 20, $LeftChannel, $hBrush)

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

    _GDIPlus_BrushSetSolidColor($hBrush, _CalcColor($RightChannel))
    _GDIPlus_GraphicsFillRect($visBuffer, 25, 80 - $RightChannel, 20, $RightChannel, $hBrush)

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

    _BASS_CHANNELGETDATA($hMusic, DllStructGetPtr($fftstruct), $BASS_DATA_FFT256)
    For $i = 1 To 127 Step 1
    $FFT = Round(DllStructGetData($fftstruct, 1, $i + 1) * 700)
    _GDIPlus_PenSetColor($pen, _CalcColor($FFT))
    _GDIPlus_GraphicsDrawLine($visBuffer, 50 + $i * $pen_size, 80, 50 + $i * $pen_size, 80 - $FFT, $pen)
    Next
    EndIf
    _GDIPlus_GraphicsDrawImageRect($visGraphics, $visBitmap, 0, 0, 320, 80)
    EndFunc ;==>DISPLAY_VIS

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

    Func _CalcColor($iPercent)
    $R = $iPercent * 3.5
    $G = 171
    $B = 255
    Return "0x77" & Hex($R, 2) & Hex($G, 2) & Hex($B, 2)
    EndFunc ;==>_CalcColor

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

    #region Funcs :2:
    Func _CheckHover()
    $CurInf = GUIGetCursorInfo($ChildGUI)
    If @error Then Return

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

    If $Hover Then
    If $CurInf[2] Then
    Switch $Hover
    Case $MusikTabLabel
    If $hAktullesImage <> $hMusikImage Then
    $hAktullesImage = $hMusikImage
    GUICtrlSetState($MusikTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $RadioTabLabel
    If $hAktullesImage <> $hRadioImage Then
    $hAktullesImage = $hRadioImage
    GUICtrlSetState($RadioTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $CDPlayerTabLabel
    If $hAktullesImage <> $hCDPlayerImage Then
    $hAktullesImage = $hCDPlayerImage
    GUICtrlSetState($CDPlayerTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $OptionenTabLabel
    If $hAktullesImage <> $hOptionenImage Then
    $hAktullesImage = $hOptionenImage
    GUICtrlSetState($OptionenTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    Case $CreditsTabLabel
    If $hAktullesImage <> $hCreditsImage Then
    $hAktullesImage = $hCreditsImage
    GUICtrlSetState($CreditsTab, $GUI_SHOW)
    SetBitmap($GUI, $hAktullesImage, 255)
    EndIf
    EndSwitch
    EndIf
    EndIf

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

    If $Hover = $CurInf[4] Then Return

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

    Switch $Hover
    Case $MusikTabLabel, $RadioTabLabel, $CDPlayerTabLabel, $OptionenTabLabel, $CreditsTabLabel
    GUICtrlSetColor($Hover, 0xFFFFFF)
    Case $topplay
    If ($Playingstate = 1) Or ($Playingstate = 2) Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    If $Playingstate = -1 Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Case $topvor
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hForwNoHoverImage, 152, 53, 37, 27)
    Case $topback
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hBackNoHoverImage, 152, 80, 37, 28)
    EndSwitch

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

    $Hover = $CurInf[4]
    Switch $Hover
    Case $MusikTabLabel, $RadioTabLabel, $CDPlayerTabLabel, $OptionenTabLabel, $CreditsTabLabel
    GUICtrlSetColor($Hover, 0xCCCCCC)
    Case $topplay
    If ($Playingstate = 1) Or ($Playingstate = 2) Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopHoverImage, 108, 53, 43, 55)
    If $Playingstate = -1 Then _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayHoverImage, 108, 53, 43, 55)
    Case $topvor
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hForwHoverImage, 152, 53, 37, 27)
    Case $topback
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hBackHoverImage, 152, 80, 37, 28)
    EndSwitch
    EndFunc ;==>_CheckHover

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

    Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    If ($hWnd = $GUI) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION
    EndFunc ;==>WM_NCHITTEST

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

    Func SetBitmap($hgui, $hImage, $iOpacity)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend

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

    $hScrDC = _WinAPI_GetDC(0)
    $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
    _WinAPI_UpdateLayeredWindow($hgui, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_ReleaseDC(0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
    EndFunc ;==>SetBitmap

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

    Func WM_DROPFILES_FUNC($hWnd, $MSGID, $WPARAM, $LPARAM)
    Local $NSIZE, $PFILENAME
    Local $NAMT = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", -1, "ptr", 0, "int", 255)
    For $i = 0 To $NAMT[0]
    $NSIZE = DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", $i, "ptr", 0, "int", 0)
    $NSIZE = $NSIZE[0] + 1
    $PFILENAME = DllStructCreate("wchar[" & $NSIZE & "]")
    DllCall("shell32.dll", "int", "DragQueryFileW", "hwnd", $WPARAM, "int", $i, "ptr", DllStructGetPtr($PFILENAME), "int", $NSIZE)
    $FILENAME = DllStructGetData($PFILENAME, 1)
    ConsoleWrite($FILENAME & @CRLF)
    ReDim $gaDropFiles[$i + 1]
    $gaDropFiles[$i] = DllStructGetData($PFILENAME, 1)
    $PFILENAME = 0
    Next
    For $i = 0 To UBound($gaDropFiles) - 2
    GUICtrlCreateListViewItem(StringRegExpReplace($gaDropFiles[$i], ".*\\(.*)\..*", "$1") & "|" & $gaDropFiles[$i], $PlaylistListView)
    Next
    _GUICtrlListView_SetColumnWidth($PlaylistListView, 0, $LVSCW_AUTOSIZE)
    EndFunc ;==>WM_DROPFILES_FUNC

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

    Func WM_NOTIFY($hWndFrom, $iIDFrom, $iNotifyCode, $wParam, $lParam); Die Funktion muß 5 Parameter haben.
    ;~ #forceref $hWnd, $iMsg, $iwParam
    ;~ Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    ;~ $hWndListView = $PlaylistListView
    ;~ If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($PlaylistListView)

    [/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 $NM_DBLCLK, $NM_RETURN
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
    $iIndex = DllStructGetData($tInfo, "Index")
    _LEFTDBLCLICK(_GUICtrlListView_GetItemText($iIDFrom, $iIndex, 1), $iIndex)
    ;~ EndSwitch
    ;~ EndSwitch
    ;~ Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    Func _LEFTDBLCLICK($file, $num)
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, False)
    $titelnummer = 0
    If $Playingstate = 1 Or 2 Then
    _BASS_CHANNELSTOP($hMusic)
    EndIf
    $Playingstate = -1

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

    $hMusic = _BASS_STREAMCREATEFILE(False, $file, 0, 0, 0)
    _BASS_CHANNELPLAY($hMusic, 0)
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    $Playingstate = 1
    $titelnummer = $num
    _GUICtrlListView_SetItemDropHilited($PlaylistListView, $titelnummer, True)
    EndFunc ;==>_LEFTDBLCLICK

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

    Func _Playfromtop()
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Return
    EndIf
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    For $i = 0 To _GUICtrlListView_GetItemCount($PlaylistListView)
    If _GUICtrlListView_GetItemSelected($PlaylistListView, $i) Then
    _PlayMusic($i)
    Return
    EndIf
    Next
    _PlayMusic(0)
    EndFunc ;==>_Playfromtop

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

    Func _PlayMusic($listviewline)
    $file = _GUICtrlListView_GetItemTextArray($PlaylistListView, $listviewline)
    $hMusic = _BASS_STREAMCREATEFILE(False, $file[2], 0, 0, 0)
    _BASS_CHANNELPLAY($hMusic, 0)
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hStopNoHoverImage, 108, 53, 43, 55)
    $Playingstate = 1
    $titelnummer = $listviewline
    EndFunc ;==>_PlayMusic

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

    Func _Playnext()
    Local $wasplaying = 0
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    $wasplaying = 1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Sleep(500)
    EndIf
    If $titelnummer = _GUICtrlListView_GetItemCount($PlaylistListView) - 1 Then $titelnummer = -1
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    If $wasplaying = 1 Then _PlayMusic($titelnummer + 1)
    EndFunc ;==>_Playnext

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

    Func _Playback()
    Local $wasplaying = 0
    If $Playingstate = 1 Or $Playingstate = 2 Then
    _BASS_CHANNELSTOP($hMusic)
    $Playingstate = -1
    $wasplaying = 1
    _GDIPlus_GraphicsDrawImageRect($hGraphicButtons, $hPlayNoHoverImage, 108, 53, 43, 55)
    Sleep(500)
    EndIf
    If $titelnummer = 0 Then $titelnummer = _GUICtrlListView_GetItemCount($PlaylistListView)
    If _GUICtrlListView_GetItemCount($PlaylistListView) = 0 Then Return
    If $wasplaying = 1 Then _PlayMusic($titelnummer - 1)
    EndFunc ;==>_Playback

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

    Func AKTUALISIEREN()
    $song_lengthdata = StringSplit(_BASS_ChannelBytes2Seconds($hMusic, _BASS_ChannelGetLength($hMusic, $BASS_POS_BYTE)), ".")
    $currentdata = StringSplit(_BASS_ChannelBytes2Seconds($hMusic, _BASS_ChannelGetPosition($hMusic, $BASS_POS_BYTE)), ".")
    $currentdata = Floor($currentdata[1] / 60) & ":" & $currentdata[1] - Floor($currentdata[1] / 60) * 60
    $song_lengthdata = Floor($song_lengthdata[1] / 60) & ":" & $song_lengthdata[1] - Floor($song_lengthdata[1] / 60) * 60
    GUICtrlSetData($GesamtOderBeiKlickNochVerbleibendeZeit, $song_lengthdata)
    GUICtrlSetData($SchonGespieltZeit, $currentdata)
    EndFunc ;==>AKTUALISIEREN

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

    Func Mail()
    $Betreffsend = GUICtrlRead($Betreff)
    $Editsend = GUICtrlRead($Edit)
    If $Betreffsend = "" Or $Betreffsend = "<Betreff auswählen>" Then
    MsgBox(48, "Warnung!", "Bitte Betreff auswählen !")
    Return
    EndIf
    _INetMail("*@gmx.net", $Betreffsend, _DebugBugReportEnv() & @CRLF & $Editsend & @CRLF & @Compiled)
    EndFunc ;==>Mail

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

    Func WM_NOTIFY_Radio($hWndFrom, $iIDFrom, $iNotifyCode, $wParam, $lParam); Die Funktion muß 5 Parameter haben.
    ConsoleWrite($hWndFrom & @CRLF)
    ConsoleWrite($iIDFrom & @CRLF)
    ;~ #forceref $hWnd, $iMsg, $iwParam
    ;~ Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView, $tInfo
    ;~ $hWndListView = $SenderListView
    ;~ If Not IsHWnd($hWndListView) Then $hWndListView = GUICtrlGetHandle($SenderListView)

    [/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 $NM_DBLCLK, $NM_RETURN
    $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam)
    $iIndex = DllStructGetData($tInfo, "Index")
    _LEFTDBLCLICK_Radio(_GUICtrlListView_GetItemText($iIDFrom, $iIndex, 1))
    ;~ EndSwitch
    ;~ EndSwitch
    ;~ Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

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

    Func _LEFTDBLCLICK_Radio($file)
    MsgBox(0,"",$file)
    EndFunc ;==>_LEFTDBLCLICK
    #endregion Funcs :2::

    [/autoit]


    Ich hoffe du verstehst jetzt warum ich gemeint habe 90% des Codes wäre unnötig :D
    Wenn du noch Fragen zur UDF hast, kannst du mich nochmal anschreiben.