Matrix-Funktionen auf PNG-Bild in einem "WS_EX_LAYERED"-Fenster anwenden

  • Hallo, liebe AutoIt-Gemeinde, ich habe eine grundsätzliche Frage:

    Ist es möglich, auf ein mit "WS_EX_LAYERED" definiertes Fenster, bzw. auf ein in diesem Fenster gezeigten Bild zuzugreifen mit den diversen "Matrix"-Funktionen wie zum Beispiel "Function _GDIPLUS_Matrix_Scale"?
    Ich versuche seit Tagen, mittels der Matrix-Funktionen auf ein transparentes Bild (PNG-Format) zuzugreifen. Es funktioniert immer nur, wenn ich die "WS_EX_LAYERED"-Definition herausnehme.
    Falls es möglich sein sollte, mit "Matrix"-Funktionen auf PNG-Bilder in einem WS_EX_LAYERED-Fenster zuzugreifen, wäre ich euch allerdings sehr dankbar, wenn ihr mir dies an einem Code-Schnipsel aufzeigen könntet. Vielen Dank schon mal im voraus.

    Poste nachstehend ein Beispiel (es ist das "Wasserzeichen"-Beispiel aus dem Forum). Aus den Zeilen 49 und 50 wird das Problem vielleicht besser ersichtlich:
    Aktiviere ich die Zeile 49, wird das Bild zwar als Layer dargestellt, aber die Matrix-Funktionen zeigen keine Wirkung, die Schleife läuft aber durch (Bild lässt sich nicht sofort wieder schließen, dauert einige Sekunden).

    Bei Aktivierung der Zeile 50 funktioniert zwar der Matrix-Code, jedoch ist das Bild nicht mehr frei zu bewegen.

    Vielleicht kann mir ja doch jemand helfen.


    PS: Im Funktionsaufruf muss noch ein Pfad zu einem PNG-Bild, sowie ein Pfad zu einer Kopie eingetragen werden.
    Das Original wird nicht geändert; die Kopie wird nicht gespeichert, da es hier nicht notwendig ist.

    Ich arbeite mit AutoIt 3.3 und SCITE Ver. 1.78

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

    #include <GUIConstants.au3>
    #include <GuiEdit.au3>
    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <GDIPlus.au3>
    #include <GDIPlusConstants.au3>

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

    Opt("MustDeclareVars", 0)

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

    Global Const $AC_SRC_ALPHA = 1
    Global $hGUI1, $hMatrix, $x, $y, $hGraphic, $hImage2, $ImageWidth, $ImageHeight, $iWidth, $iHeight

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

    ; !!!!!!!!!! Hier bitte noch Pfade eingeben
    _Wasserzeichen("Pfad zum Originalbild .png","Pfad zur Bildkopie .png", "Das ist ein Test" )

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

    func _Wasserzeichen($input,$ouput,$text)

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

    $hGUI2 = GUICreate("GDI+", 400, 300, 900, 50)
    GUICtrlSetState(0,$GUI_FOCUS)
    GUISetState()

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

    _GDIPlus_Startup() ;<=======Startup
    $hImage2=_GDIPlus_BitmapCreateFromFile($input) ;<======Das Bild wird geöffnet
    $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage2)

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

    $Brush1 = _GDIPlus_BrushCreateSolid (0xFFECE9D8)
    _GDIPlus_GraphicsFillRect($hGraphic, 60, 20, 100, 50, $Brush1)

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

    $hBrush = _GDIPlus_BrushCreateSolid (0xFF7B97E0)
    $hFamily = _GDIPlus_FontFamilyCreate("Arial") ;<======Schriftart
    $hFont = _GDIPlus_FontCreate($hFamily, 16) ;<======Schriftgröße
    $hLayout = _GDIPlus_RectFCreate(70, 20, 100, 100) ;<======position der Schrift
    $hStringFormat = _GDIPlus_StringFormatCreate()
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $text, $hFont, $hLayout, $hStringFormat, $hBrush) ;<======Die schrift wird drauf gemalt

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

    ;_GDIPlus_ImageSaveToFile($hImage2,$ouput); <======Das neue Bild wird gespeichert

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

    $hGUI1 = GUICreate("BILD", 222, 361, -1, -1, -1, $WS_EX_LAYERED, $hGUI2) ; !!!!!!!!!! Bild wird als Layer dargestellt;
    ;$hGUI1 = GUICreate("BILD", 700, 700, -1, -1, -1) ; !!!!!!!!!! Bild wird mittels Matrix-Funktionen rotierend dargestellt
    GUISetState()

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

    $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage2)
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI1)

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

    SetBitMap($hGUI1, $hImage2, 255)
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUISetState()

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

    ; Matrix-Code Anfang ------------------------------------------------------------------------
    $iWidth = _GDIPlus_ImageGetWidth($hImage2) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage2)
    $iHeight = _GDIPlus_ImageGetHeight($hImage2) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage2)

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

    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, 370, 370)

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

    For $i = 1 To 360
    _GDIPlus_MatrixRotate($hMatrix, 1, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage2, -$iWidth / 2, -$iHeight)
    Sleep(1)
    Next
    ; Matrix-Code Ende --------------------------------------------------------------------------

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

    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUISetState()

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

    ;<======Es wird aufgeräumt ;)
    _GDIPlus_Brushdispose($Brush1)
    _GDIPlus_Brushdispose($hBrush)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_StringFormatDispose($hStringFormat)

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

    _WinAPI_DeleteObject($hImage2)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown() ;<======GDIplus wird beendet

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

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    EndFunc

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

    ; zusätzliche Funktionen Anfang --------------------------------------------------------------------------

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

    Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    if ($hWnd = $hGUI1) and ($iMsg = $WM_NCHITTEST) then Return $HTCAPTION
    EndFunc

    [/autoit][autoit][/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 )
    ;MsgBox(0, "$tSize / $pSize", $tSize & " / " & $pSize)
    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

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

    ; zusätzliche Funktionen Ende --------------------------------------------------------------------------

    [/autoit]

    Auch wenn ich nichts weiß, muss ich nicht alles glauben

    3 Mal editiert, zuletzt von Peri Petie (19. Juli 2009 um 10:16)

  • Vielen Dank, UEZ.
    Hab' zwar zwischenzeitlich bezüglich des Handlings mit freibeweglichen transparenten PNG-Bildern nur mit GDI+ ohne Matrix-Funktionen gearbeitet, aber werde mir Deinen Tipp mal ansehen. Wäre schön, wenn ich sie doch anwenden könnte. Die Matrix-Funktionen find' ich nämlich geil.

    Auch wenn ich nichts weiß, muss ich nicht alles glauben

  • Bei der Spielerei mit den Matrix-Funktionen ist u. a. nachstehender Code entstanden (das meiste natürlich aus dem Forum geklaut). ;)

    Nach Laden eines Bildes lässt sich dieses mittels der Tasten „Pfeil oben“ und „Pfeil unten“ auf dem Bildschirm in Echtzeit verkleinern bzw. vergrößern. Bilder im PNG-Format erscheinen transparent.

    Der Redraw funktioniert jedoch nicht hundertprozentig.

    Bei der Darstellung von PNG-Bildern, die innerhalb des Bildes einen Ausschnitt aufzeigen, wie zum Beispiel bei einem Ring, entsteht beim Vergrössern ein eigentlich nicht erwünschter Effekt, der aber sofort verschwindet, sobald man das Bild wieder um einen Schritt verkleinert.

    Bei anderen Bild-Formaten müsste auch noch einmal nachgerechnet werden.


    Ausserdem verschwindet der „Insert“-Button hin und wieder, je nachdem, auf welche Grösse das Bild gebracht wird. Der Button erscheint aber sofort wieder, sobald man mit der Maus über die Position des Buttons fährt. Eigentlich gehört der Button bei dieser Applikation ja auch nicht in das Fenster. Das Laden eines Bildes sollte hier aus einem Menu heraus erfolgen. Ich hatte es aber erstmal so belassen.

    Vielleicht kann ja jemand den Code gebrauchen und entsprechend „umstricken“.


    [autoit]


    #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

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

    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <GuiConstantsEx.au3>
    #include <WinAPI.au3>
    #include <GDIPlusConstants.au3>

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

    Opt("MustDeclareVars", 1)

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

    Global $hGui, $msg, $insert, $PIC, $hGraphic, $hBrush, $hImage, $WindowWidth, $WindowHeight, $x, $y, $ImageWidth, $ImageHeight, $iWidth, $iHeight, $hMatrix

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

    $hGui = GUICreate("SCALE", 800, 600)
    $insert = GuiCtrlCreateButton("Insert Pic" ,10,10)
    GUISetState()

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

    While GUIGetMsg() <> -3
    $msg = GUIGetMsg()

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

    $x = 1.0
    $y = 1.0
    If _IsPressed ("26") Then
    _SizeBig()
    ElseIf _IsPressed ("28") Then
    _SizeSmall()
    EndIf

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

    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop

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

    Case $msg = $insert
    _GDIPlus_Startup()
    $WindowWidth = 800
    $WindowHeight = 600

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

    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFFECE9D8)
    _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $WindowWidth, $WindowHeight, $hBrush)

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

    $PIC = FileOpenDialog("Bitte Bild auswählen", "C:", "Bilder (*.jpg;*.bmp;*.png)", 1 + 4 )
    $hImage = _GDIPlus_ImageLoadFromFile($PIC)
    $ImageWidth = _GDIPlus_ImageGetWidth($hImage)
    $ImageHeight = _GDIPlus_ImageGetHeight($hImage)
    $iWidth = _GDIPlus_ImageGetWidth($hImage) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, $WindowWidth/2, $WindowHeight/2)

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

    _GDIPlus_MatrixScale($hMatrix, 0.5, 0.5)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFFECE9D8)
    _GDIPlus_GraphicsFillRect($hGraphic, $ImageWidth, $ImageHeight, -$iWidth / 2, -$iHeight / 2, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)

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

    EndSelect

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

    WEnd

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_Shutdown()

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

    Func _SizeBig()
    _GDIPlus_MatrixScale($hMatrix, $x+0.05, $y+0.05)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    ;_GDIPlus_GraphicsClear($hGraphic)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFFECE9D8)
    _GDIPlus_GraphicsFillRect($hGraphic, -$ImageWidth, -$ImageHeight, -$iWidth / 2, -$iHeight / 2, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc

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

    Func _SizeSmall()
    _GDIPlus_MatrixScale($hMatrix, $x-0.05, $y-0.05)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    ;_GDIPlus_GraphicsClear($hGraphic)
    $hBrush = _GDIPlus_BrushCreateSolid (0xFFECE9D8)
    _GDIPlus_GraphicsFillRect($hGraphic, -$ImageWidth, -$ImageHeight, $iWidth*2, $iHeight*2, $hBrush)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc

    [/autoit]

    Auch wenn ich nichts weiß, muss ich nicht alles glauben

  • Nachdem ich den Code „Rotating Image 2.au3“ (drei Postings zuvor) zunächst verworfen hatte, weil er mir auf den ersten Blick für meine Zwecke nicht geeignet erschien, habe ich ihn mir nun doch noch einmal genauer angesehen. Auch wenn ich den grössten Teil des Codes herausgelöscht habe (ich hätte wohl auch bei Null anfangen können ;) ), hat die Experimentiererei mit dem Restcode doch dazu geführt, endlich meine ursprüngliche Frage zu beantworten.

    Mit dem nachfolgenden Code können Bilder im Format JPG, BMP und PNG geladen werden. Es können sicher auch andere Formate geladen werden, die Transparenz funktioniert jedoch nur mit PNG-Bildern. Darauf kam es mir in erster Linie auch an. Die Bilder lassen sich mit der Maus frei auf dem Desktop verschieben.

    Bei der Veränderung von Parametern im Code können zur besseren Orientierung die Zeile 71 (…GraphicsDrawImageRect) aktiviert, und der Farbwert in Zeile 67 (…GraphicsClear) getauscht werden. Damit ist das komplette Fenster, in dem sich die Grafik bewegt, ersichtlich.

    Zum Testen hatte ich keine Schleife eingebaut, also nach dem Laden des Bildes nicht nur einmal auf den Button „rotate“ klicken. ;)

    Also, Matrix-Funktionen lassen sich auch auf mit der Maus verschiebbare transparente PNG-Bilder anwenden.

    [autoit]


    #include <GDIPlus.au3>
    #include <windowsconstants.au3>
    #Include <Misc.au3>
    #include <GuiConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>

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

    Opt("MustDeclareVars", 1)

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

    Global $hGUI_Main, $hwnd, $msg, $load, $rotate, $close, $graphics, $bitmap, $backbuffer, $matrix, $image, $PIC

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

    Global Const $AC_SRC_ALPHA = 1

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

    $hGUI_Main = GUICreate("GDI+", 400, 300, 400, 400, $WS_CAPTION)
    $load = GuiCtrlCreateButton("load" ,10,10)
    $rotate = GuiCtrlCreateButton("rotate" ,10,40)
    $close = GuiCtrlCreateButton("end" ,10,70)
    GUISetState()

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

    $hwnd = GUICreate("Test", 100, 100, 90, 26, $WS_POPUPWINDOW , BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hGUI_Main)

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

    _GDIPlus_Startup()

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

    $graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(300, 300, $graphics)
    $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)

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

    $matrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($matrix, 150, 150)
    While 1

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

    $msg = GUIGetMsg()

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

    Select
    case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $load
    _load()
    Case $msg = $rotate
    _rotate()
    Case $msg = $close
    _close()
    EndSelect

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

    WEnd

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

    _GDIPlus_ImageDispose($image)
    _GDIPlus_GraphicsDispose($graphics)
    _WinAPI_DeleteObject($bitmap)
    _GDIPlus_MatrixDispose($matrix)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown ()

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

    Func _load()
    $PIC = FileOpenDialog("Bitte Bild auswählen", "C:\", "Bilder (*.jpg;*.bmp;*.png)", 1 + 4 )
    If $PIC = "" Then Return
    _rotate()
    EndFunc

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

    Func _rotate()
    $image = _GDIPlus_ImageLoadFromFile($PIC)

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

    _GDIPlus_GraphicsClear($backbuffer, $GDIP_PXF32ARGB) ;0xFF123456)
    _GDIPlus_MatrixRotate($matrix, -15)
    _GDIPlus_GraphicsSetTransform($backbuffer, $matrix)
    _GDIPlus_GraphicsDrawImageRect($backbuffer, $image, -100, -100, 200, 200)
    ;_GDIPlus_GraphicsDrawRect($backbuffer, -100, -100, 200, 200) ;

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

    SetBitMap($hwnd, $bitmap, 100)
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    GUISetState()
    EndFunc

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

    Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    If ($iMsg = $WM_NCHITTEST) then Return $HTCAPTION
    EndFunc

    [/autoit][autoit][/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

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

    Func _close()
    Exit
    EndFunc

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

    Auch wenn ich nichts weiß, muss ich nicht alles glauben